The classic dinner combo of beans and rice may need a change up: Swapping out rice for beans may lead to substantially lower rates of diabetes, according to a study published in The American Journal of Clinical Nutrition and reported by Reuters Health.

For the study, researchers at the Harvard School of Public Health looked at the diets of nearly 1,900 Costa Rican men and women taking part in a study of risk factors for heart disease. None of the participants had diabetes when the study started.

Researchers found that people who ate more rice over time had higher rates of metabolic syndrome, a risk factor for type 2 diabetes and heart disease that includes higher blood pressure and levels of sugar and unhealthy fats in their blood and lower levels of “good” cholesterol.

In contrast, people who ate at least two servings of beans for every serving of white rice reduced their risk of metabolic syndrome by 35 percent.

“Rice is very easily converted into sugar by the body,” said study author Frank Hu, professor of nutrition and epidemiology at the Harvard School of Public Health. “Beans compared with rice contain much more fiber, certainly more protein, and they typically have a lower glycemic index—meaning they induce much lower insulin responses.”

Hu added that a serving of white rice is “like eating a candy bar—the fiber and other nutrients are stripped away” and that the trend “will have long-term metabolic effects.”

And it doesn’t seem like either Americans or Latinos are slowing down. In the United States, rice consumption is up from 9.5 pounds per person in 1980 to 21 pounds in 2008. Meanwhile, consumption of dry beans hovers at around 7 pounds per year per person.

Researchers advise consumers to introduce more veggies and legumes into their diets and to avoid white rice and red meat.