Most people want to do their best to lower the risk of developing scary illnesses like cancer and heart disease. (If you don’t, we should talk.) While some factors like genetics can’t be helped, certain lifestyle tweaks can decrease your odds.

According to a new study published in the journal Nature Communications, eating a diet rich in flavonoids, compounds found in plant-based foods and drinks, can reduce your risk of dying from cancer and heart disease. The study analyzed data from the Danish Diet, Cancer and Health cohort that collected information on the diets of 53,048 Danes over 23 years.

RELATED:

Researchers discovered that people who regularly consumed “moderate” amounts of flavonoid-rich foods had an inverse relationship with dying from heart disease or cancer. (Meaning, the more flavonoids they consumed, the lower their risk.) This effect topped out at having about 500 milligrams a day, researchers found.

The study also showed a strong link between consuming regular doses of flavonoids, smoking, and drinking alcohol. People who were at a high risk of developing chronic diseases due to smoking and drinking more than two alcoholic drinks a day seemed to benefit the most from eating flavonoid-rich foods.

That doesn’t mean that eating flavonoid-rich foods will wipe out the harmful effects of excessive drinking and smoking, the researchers warn. But, the study found, it may help lower the risk of developing chronic diseases from these habits.

While flavonoids are known to be good for you, the researchers aren’t totally sure what it is about them that lowers the risk of developing certain diseases. Flavonoids fight inflammation and improve blood vessel function, which could play a role, lead researcher Nicola Bondonno, a post-doctoral research fellow at Australia’s Edith Cowan University, said in a press release. Beyond that, though, more research is needed.

RELATED: The 50 Best Weight Loss Foods of All Time

What are flavonoids again?

Flavonoids are a group of compounds usually found in fruits, vegetables, grains, bark, roots, stems, flowers, tea, and wine. Flavonoids are known for their anti-inflammatory and anti-carcinogenic properties, and are “noted for their antioxidant benefits,” nutritionist Jessica Cording, a New York-based RD, tells Health.

Flavonoids are also a sub-class of polyphenols, a category of plant compounds that have been linked to a slew of health benefits, such as a decreased risk of developing heart disease, type 2 diabetes, and certain cancers, Sonya Angelone, RD, a spokeswoman for the Academy of Nutrition and Dietetics, tells Health.

“Flavonoids are phenolic compounds found in most plants and are the most plentiful of all the non-nutrient bioactive constituents of foods,” nutritionist Julie Upton, RD, cofounder of nutrition website Appetite for Health, tells Health.

Since the amount of flavonoids can vary widely in foods, and the amount needed for optimal health isn’t known, there is no Dietary Reference Intake (DRI) or Daily Value (DV) for flavonoids, Angelone says. But as a whole, flavonoid-rich foods are ones you definitely want to have in regular rotation in your diet.

RELATED: 13 Healthy High-Fat Foods You Should Eat More

This isn’t the first time flavonoids have been linked to a decreased risk of cancer and heart disease

Flavonoids have been studied pretty extensively recently, and research has repeatedly found that these foods correlate with better health. One meta-analysis of 12 studies published in PLOS One found that the risk of breast cancer “significantly decreased” in women who consumed a lot of flavonoids in their diet.

Another study published in the Journal of Translational Medicine analyzed food questionnaires and health data from 1,658 people and found that the more flavonoids people had, the lower their risk of developing heart disease, having a non-fatal heart issue, and dying of heart disease.

What are the best flavonoid-rich foods?

Many fruits and vegetables are a great source of flavonoids, but nutritionists say these are among the best flavonoid-rich foods and drinks you can have: tea (especially green tea), dark chocolate (Cording recommends opting for 85% cacao or more), berries, apples, citrus fruits, asparagus, leafy greens, and red wine

If you don’t feel like looking up the flavonoid content in your food every time you eat, remember that in general, fruits and vegetables with a lot of color contain flavonoids (think: blueberries, oranges, and spinach). Angelone says. However, Onions and garlic also contain the compounds, adds Upton.

RELATED: 9 Subtle Signs You Could Have a Heart Problem

How can I make sure I’m eatingenough flavonoid-rich foods?

This particular study found that 500 milligrams is a good amount to aim for daily. If you wanted to break that down diet-wise, it would mean having a cup of tea, an apple, an orange, a little more than a half cup serving of blueberries, and about a cup of broccoli in a day.

If you don’t want to have to think about it that much, you can steal this trick from Cording: “Aim for one flavonoid-rich food at each meal.” That can be as simple as sprinkling blueberries on your oatmeal in the morning, adding a handful of spinach to your pasta sauce, and having an orange as a snack.

“The best way to get flavonoids is to eat plenty of fresh or lightly cooked produce, six or more servings a day,” Angelone says. Keep this in mind, though, per Angelone: Some flavonoids are lost during storage, especially in the first couple of weeks, and they’re lost when you cook them. That’s why she recommends having a combination of cooked and raw produce. “Cooking can enhance the digestion of fiber and make some nutrients more bioavailable but can destroy other nutrients, especially with prolonged cooking,” she explains.

Still, if you can’t get up to 500 milligrams of flavonoids a day, you shouldn’t stress it: Research has found that having any amount of flavonoids a day seems to be better at lowering your disease risk than none at all.

To get more nutrition and diet tips delivered to your inbox, sign up for the Balanced Bites newsletter.