Coffee is already the go-to fix after a night of heavy drinking. But a new study shows it isn't just helping your headache—it's helping your liver, too.

Scientists with the World Cancer Research Fund International found strong evidence that drinking coffee decreases your risk of liver cancer. And they found that drinking three or more alcoholic beverages a day can cause it.

According to the Chicago Tribune, researchers tracked 8.2 million people who participated in 34 studies around the world, including 24,500 participants with liver cancer. They found that on average, just one cup of coffee a day reduces the risk of liver cancer by 14%. The results were significant for men, but not for women, and researchers aren't sure why.

They also found that people who were overweight or obese had a higher risk of liver cancer, as well as people who ate food contaminated by aflatoxins, which are produced by fungi that grow on improperly stored food. (Foods like cereals, spices, and various nuts are especially prone to aflatoxins.)

The researchers recommend staying at a healthy weight and only drinking in moderation—one drink a day for women and two drinks a day for men – to truly avoid risks of liver cancer. The link between alcohol and liver cancer is way stronger than the link between coffee and preventing it. But a few cups of joe in the morning might not hurt, either.

It's the latest in a slew of studies hammering home the point that coffee is great for you. An independent panel of experts told the U.S. government that coffee can lower your risk for type 2 diabetes, heart disease, and Parkinson's disease. Add liver cancer to the mix and you have no excuse not to guzzle some Starbucks after a rough night out.