Coffee doesn’t have the best reputation as a healthy beverage, despite several studies that suggest the contrary. The caffeinated drink is more than just a mood-stabilizer and morning savior. Among its many health benefits, researchers have linked it a lowered risk of Alzheimer’s disease and suggest it’s a worthy defender against cirrhosis of the liver.

Critics of the beloved bean juice have long maintained that coffee is bad for the heart, and considering too many cups tend to make people jittery, that rationale has gone mostly unchallenged. However, a new study published in PLOS Biologyargues that there is an optimum amount of coffee intake that will maintain a healthy heart. “We’ve disproved what doctors have told your grandma: Don’t drink coffee if you have a heart problem,” study co-authors Joachim Altschmied, Ph.D. and Judith Haendeler, Ph.D., told Inverse.

Healthier than you might have guessed.

Altschmied and Haendeler, both University of Dusseldorf biologists, say that four cups a day can actually help heart cells function more efficiently, as that amount of caffeine will “push” a protein called p27 into the mitochondria of heart cells.

It’s not the only health benefit. “It’s known that four cups or more of coffee lowers the risk for heart attack, stroke, and diabetes,” says Altschmied. So the next time you’re worried about grabbing that late afternoon cuppa, remember these health benefits that come with four cups of coffee.

1. Decreased risk of heart disease

Not only does coffee boost heart cell activity, but researchers at Sungkyunkwan University in South Korea found that regular coffee drinkers have less risk of heart disease. The study, led by Dr. Yuni Choi, screened over 25,000 men and women and found those who consumed three to five cups of coffee a day were less likely to see a prevalence of coronary artery calcium or early signs of heart disease.

2. Reduced risk of colorectal cancer

According to a study at the University of Southern California, coffee can reduce the odds of developing colorectal cancer by 26 percent. And that’s just if you’re the casual coffee drinker. For those who drink more than 2.5 servings of coffee a day, the risk of cancer decreases up to 50 percent. This was true even when participants drank decaf, meaning there’s more goodness to coffee than just the caffeine.

“We were somewhat surprised to see that caffeine did not seem to matter,” said Stephen Gruber, M.D., Ph.D., M.P.H., and lead author of the study. “This indicates that caffeine alone is not responsible for coffee’s protective properties.”

3. Defense against Alzheimer’s disease

There have been several studies that suggest caffeine can protect against dementia and Alzheimer’s disease. Not only does caffeine offer short-term stimulating effects on the central nervous system, but researchers are beginning to study the long-term impacts on cognition. One such study from Portugal found that coffee drinkers have up to a 65 percent lower risk of getting Alzheimer’s disease, which could open possibilities for preventing or postponing the onset of the disease.

4. Protecting the liver

There’s plenty of evidence that alcohol is bad for the liver. But if you’re drinking coffee the morning after a party, you might be healing more than just the hangover.

Many diseases, such as hepatitis, fatty liver disease, or chronic alcoholism, can lead to cirrhosis, or scarring of the liver. However, separate studies conducted in the United States and Italy found that people who drank four or more cups a day up to an 80 percent lower risk of cirrhosis, especially the type brought on from alcohol consumption.

Unlike other caffeinated beverages, coffee’s unique properties are offering scientists key insights on how to prevent diseases, suggesting that it’s more than just a stimulant.