Good news for everyone who can’t start their morning without a cup of coffee: Preliminary research shows that drinking coffee might come with a reduced risk of stroke and heart failure.

The study, which was a machine analysis of data from the long-running Framingham Heart Study, showed a 7% lower risk of heart failure and 8% lower risk of stroke per cup of coffee consumed each week.

So, the more coffee you drink, the less likely you are to have heart problems. Of course, the study only showed an association between the two, not causality, so we can’t know for sure that the coffee is the reason these people have healthy hearts.

The research was presented at the American Heart Association’s 2017 Scientific Sessions. It used machine learning to analyze the data, much in the same way shopping sites can recommend products for you based on your shopping history.

The researchers also validated the results of the study by conducting two other studies without machine learning. All three showed similar results.

The machine also recognized another risk factor when it comes to potential heart disease: red meat consumption.

It was also associated with decreased risk of stroke and heart failure, but it is harder to replicate the study because of differing definitions of red meat among survey respondents.

So keep drinking your morning coffee. You know, for your heart health.

h/t EurekAlert