Gallstones sound hawrible. They’re stones… in your gallbladder. But the good news today is that roughly six cups of coffee a day may help decrease your risk.

As reported by Newsweek, a study published in the Journal of Internal Medicine took a look at over 114,000 participants in Denmark, where they “collected information such as lifestyle choices, carried out physical examinations, and collected blood from which their DNA was extracted.” After assigning an allele score that “looked at whether a genetic variant linked to metabolizing coffee was associated with drinking more coffee,” the researchers assessed the association between coffee consumption and instances of gallstones. They found that drinking one cup per day was linked to a three percent decrease in the instances of gallstones and that drinking six cups or more was associated with a much more significant 23 perfect decrease in the risk.

In both observational and genetic analyses, high coffee intake was associated with low risk of symptomatic GSD [symptomatic gallstone disease] in the general population. These results suggest that high coffee intake is likely to causally protect against symptomatic GSD.

The study was purely observational, so no causal link between coffee consumption and decreased gallstone risk has been established, but the study’s authors suggest a number of explanations, including the possibility that the body uses bile—which can build up with gallstones—to excrete all the caffeine consumed with coffee.

But whatever the reason, keep drinking that coffee because it’ll keep the gallstones away. The gall!

Zac Cadwalader is the managing editor at Sprudge Media Network and a staff writer based in Dallas. Read more Zac Cadwalader on Sprudge.