Researchers at the University of Arizona looked at post-breakup psychological adjustment and ongoing contact among 137 married adults who had recently separated. As you’d expect, people who accepted the breakup were generally better adjusted while those who still pined for it weren’t.

But that’s not all: for those who didn’t accept the breakup, making a clean break (the advice everyone gives after a breakup) didn’t leave them any happier than trying to keep up a friendship. And if they stayed in touch with their exes, they were actually doing better if they kept having sex with their partner.

“Sexual contact with an ex-partner seems to be associated with better well-being for those who aren’t over the relationship,” says lead author Ashley Mason, a clinical psychology PhD candidate. (YouBeauty Relationship Expert David Sbarra is a co-author on this study as well.)