It’s the ultimate marker of adulthood: staying friends with an ex. While some people place great value on the friendship developed, others would rather get a lobotomy to erase all memory of their former flame.

But friendships with exes can work – it just depends on why (and how) you’re in the friend zone, according to a new study.

Researchers from the University of Kansas surveyed 170 women and 110 men on how satisfying friendships with exes were. They also looked at the break-up itself in relation to the friendship’s success. In a second survey, roughly 300 women and 250 men were questioned on their motives behind their friendships with exes.

Researchers found four main reasons why we stay friends with an ex. Some of the motivations predicted a healthy friendship (which is good), while other led to toxic friendships (which is obviously very bad). The security of sound emotional support and advice clocked the number one spot, quickly followed by the practicalities of a relationship – shared Netflix, a pet or a bank account – and civility. Because people are apparently inherently nice underneath it all.

More of concern however was the fourth reason: lingering feelings. Let’s face it: who hasn’t, honestly, wanted to get back in bed with an ex?

The first three reasons (security, practicality and civility) all suggested a positive friendship, researchers concluded. But for those who stayed friends because there were still feelings involved, it often spells trouble. And probably lots of ‘come round’ 4am texts.