With the joys of casual sex comes a laundry list of unwanted side effects that rear their ugly head the minute the sun creeps in in the early morning. But after reading Hard Science today, your views on one-night stands might change, thanks to a new study in the Journal of Sex Research.

Although it’s been debated how much sex millennials are truly having, previous research has shown as many as 81% of college students are hooking up. This is in spite of a wide range of possible post-coital consequences, including regret, psychological distress, loss of friends, interpersonal conflict and sexually transmitted infections (STIs). Fun, right?

The study’s authors were interested in understanding how your friends’ attitudes about casual sex influenced whether you had a negative experience after hooking up, since previous studies have similarly shown a link between friends’ attitudes and negative drinking outcomes.

Study participants were college students recruited from three large American universities as part of a larger study on alcohol abuse. Each campus provided a list of randomly selected names of enrolled students from the registrar’s office, and these students were sent an email invitation to complete an online survey. Participants were only included if they reported having hooked up in the past year and if they had engaged in an episode of heavy drinking (five or more drinks for men; four or more drinks for women) in the past month.

To start, we need to recognize that “hooking up” means different things to different people, depending on who’s asking. So for this study, researchers defined it as “consensually engaging in physically intimate behaviors, ranging from kissing to sexual intercourse, with someone with whom you are not in a committed relationship.”

Attitudes of friends indeed influenced participants’ own attitudes about hooking up.

The sample consisted of 589 “heavy-drinking” undergraduate students between the ages of 18 and 26 years old. Roughly half of the participants (51%) were male and the majority were juniors (about 26%) and not in a committed relationship (82%).

The findings showed that the perceived attitudes of participants’ friends indeed influenced their own attitudes about hooking up, which in turn influenced their motives for doing so. Increased motivation was associated with a higher number of past hookup partners.

More specifically, those who perceived their close friends as having positive attitudes about hooking up reported similar attitudes themselves. Holding positive attitudes about hookups increased the likelihood of having at least one negative consequence, but simultaneously decreased the frequency of having additional ones. It’s possible that after one bad experience, some decided to change their game plan with regards to how and with whom they hooked up in the future.

Social-sexual motives for casual sex, such as not wanting to be tied down to one partner or a committed relationship, were correlated with a greater number of self-reported hookup partners, as could be expected. Also, people who reported hooking up as a way to enhance their lives—for example, because they found it exciting or fun—were less likely to experience negative repercussions.

Using sex to cope with emotions like loneliness or to feel attractive, however, led to more negative hookup outcomes. Previous research has shown that low mood can lead some people to seek out sex, particularly risky sex (that is unprotected and with many partners), as a way of coping and cheering themselves up. Though this may temporarily improve a person’s mental state, the ball unfortunately drops when they sober up the next morning and realize the problem hasn’t gone away.

The authors cautioned that these findings may not generalize to students who don’t engage in heavy drinking. Particularly interesting to me were the 23% of study respondents who didn’t report any negative experiences after their hookups. These individuals may have been engaging in less intimate forms of hooking up; say, kissing as opposed to intercourse. They may have also known their partners beforehand, since being familiar with someone or having a FWB situation is much less awkward than having sex with a total stranger, even when alcohol is involved.

As for navigating this terrain in the future, along with the points I’ve mentioned above, I’d highlight how important safe sex is, using methods that prevent both STIs and pregnancy. I’d also suggest making it a habit to take a condom with you (or a few) as you’re checking for your phone, wallet and keys before heading out the door.

Debra W. Soh is a sex writer and sexual neuroscientist at York University in Toronto. She has written for Harper’s, The Wall Street Journal, Scientific American, The Globe and Mail, The Los Angeles Times and many others. Follow her on Twitter: @debra_soh.