When seeking a romantic partner, we usually look for someone with certain traits: attractiveness, intelligence, sense of humor. Perhaps, though, we should also consider whether they like to drink—or, more to the point, whether their drinking habits match our own.

A study (paywall) from researchers at the University of Michigan found that couples in which both parties drink reported slightly better marriages than couples where one person drinks and the other does not. Particularly, wives reported feeling that their relationships had more negative qualities, such as criticism, when they drink and their husbands don’t. Their work was published last month in the Journals of Gerontology B: Psychological Sciences.

“The study shows that it’s not about how much they’re drinking, it’s about whether they drink at all,” Kira Birditt, a sociologist at the University of Michigan and lead author of the paper, told Reuters.

Birditt and her colleagues looked at the results of 2,767 couples from the Health and Retirement Survey, an ongoing study that has been looking at aging populations in the United States. Most of the couples were married (others lived together), and on average, had been together for 33 years. Every two years, researchers sat down with participants and asked them about how often they drink, how much, and how they felt about their partner in terms of reliability and annoyance.

About 45% of the couples reported that they both drink, and these couples tended be less irritated with each other. Although couples may have reported drinking different amounts, this seemed to matter less. Couples who reported that neither party drinks also reported slightly fewer negative traits in their relationships. Less happy with each other were couples where one partner drinks and the other doesn’t.

Birditt told Reuters that she wasn’t totally sure why they found the results that they did. “It could be that couples that do more leisure time activities together have better marital quality,” she said. Although she did not advocate for couples trying to change their drinking habits just to match each other, she did suggest that when one spouse stops drinking, the other should consider doing the same.

To be sure, just because the study participants reported feeling less negative about their relationships, it doesn’t mean they had perfect relationships. The study did not look at positive outcomes in a relationship, like feeling happy or appreciated—or at the longevity of marriages in general. It doesn’t suggest that partners with mismatched drinking habits are doomed; all the couples in the study had already been together for a long time already. “Couples often stay together despite being irritated,” Birditt wrote in an email.

But for a long-term relationship with less irritation, it may be worth considering with you both like to drink—or abstain from drinking—together.