Studies show there’s a type of complaining that actually brings you closer.

We’ve all heard how complaining is bad for us and our relationships. But damn, not complaining isn’t easy. Fortunately, new research suggests there’s a type of complaining that’s not only common in most relationships, it’s essential!

How did complaining get such a bad reputation in the first place?

Back in 2002 a study found that people who engage in “extensively discussing and revisiting problems, speculating about problems, and focusing on negative feelings” report destructive thoughts and even depression. Since then, not complaining has been overwhelmingly viewed as the only way to maintain a healthy relationship.

Additional studies have also backed up this theory. “Co-rumination,” which is basically a fancy term for excessively focusing on problems and negative feelings, has been linked to significant increases in the stress hormone known as cortisol, and even binge drinking in college students.

But guess what? Recent studies show there’s ONE type of complaining that’s an important component of close relationships.

According to Julia Case-Levine of Quartz, “studies have found that co-rumination is present in — and essential to — most close relationships. In fact, co-rumination strengthens friendships.”

So how does one build a strong relationship, while avoiding the type of complaining that has nasty affects on mental health? It all comes down to how you’re complaining. Apparently, the key is to avoid “co-brooding” and instead engage in “co-reflection.”

Co-brooding is where the focus of your conversation is discussing problems in a passive way and wishing things had just somehow turned out differently. Whereas co-reflection involves “speculating about specific elements of a problem in order to gain a greater understanding of the situation.” Additionally, co-reflecting helps us find solutions to our problems, and allows us to help “prevent the negative event from occurring in the future.”

Margot Bastin of the University of Leuven in Belgium explains that “if you are focusing on the feelings of how bad you feel and the potential consequences in a passive way, then it’s very bad. But if people are more focused on trying to grasp what’s happened to gain insight then it might actually be a very good thing.”

So basically, co-reflecting is active, solution focused and essential to building a strong relationship. On the flip side, passively co-brooding should be avoided at all costs.

And there you have it: Science proves there is a healthy way to talk shit with your friends — just make sure you’re focusing on solutions and learning from your struggles.