If you can drink your friends under the table, you may have your genes to thank. Researchers at the University of California, San Francisco, have for the first time pinpointed a genetic mutation that determines your tolerance for booze. Specifically, those who have the so-called “happy hour” mutation produce a protein called epidermal growth factor, or EGF, which allows them to imbibe more alcohol than their peers before feeling its effects, such as falling asleep or getting just plain sloppy.

Of course, the “happy hour” gene comes at a cost: Experts say a high tolerance for booze predisposes a person to alcoholism. As such, scientists say that they might be able to both decrease alcohol tolerance and help treat alcoholism by deactivating the gene.

Researchers isolated the gene by screening fruit flies for those with a high alcohol tolerance, and then performing genetic testing on both groups. They also found that some cancer drugs, such as erlotinib, appeared to block the production of EGF in rats and the fruit flies the researchers bred, lowering their cravings for alcohol but not for sugar water.

On a more sober note, when in doubt, it might be wise to put down that beer, regardless of genes. Otherwise you could end up like the Taiwanese groom who drank himself to death at his own wedding.