Our bodies technically can’t digest fiber, so it easily passes through our intestines and keeps bowel movements regular. But the roughage that’s found in fruits, vegetables, and whole grains does far more than maintain digestive health; it may contribute to good health as we age, according to a new study.

The study, published in The Journals of Gerontology, Series A: Biological Sciences and Medical Sciences, found that people who ate more fiber from cereals, breads, and fruits actually experienced a lower risk of age-related diseases and disability, like high blood pressure and even cognitive problems. The researchers examined how fiber intake contributed to successful aging compared to other factors like total carb intake, glycemic index, glycemic load, and sugar intake, and it turns out that fiber has the biggest impact on your health into old age.

“Out of all the variables we looked at, fiber intake — which is a type of carbohydrate that the body can’t digest — had the strongest influence,” said Associate Professor Bamini Gopinath in a statement. “Essentially, we found that those who had the highest intake of fiber or total fiber actually had an almost 80 percent greater likelihood of living a long and healthy life over a 10-year follow-up. That is, they were less likely to suffer from hypertension, diabetes, dementia, depression, and functional disability.”

There are two types of dietary fiber — soluble and insoluble. The former is able to dissolve in water, which turns it into a type of gel that lowers cholesterol and glucose levels, and is found in oats, peas, beans, apples, carrots, and citrus fruits like oranges. Insoluble fiber, meanwhile, can’t dissolve — and it’s the stuff that keeps the other digestive fluids moving through your intestines.

In the study, the researchers analyzed 1,600 adults who were over the age of 50 who were involved in the Blue Mountains Eye Study, which gathered data on systemic diseases and aging. The researchers focused primarily on the link between carbohydrate intake and aging — and found that people who ate more fiber were more likely to age successfully. That meant they were less likely to suffer from disability, depressive symptoms, cognitive impairment, respiratory diseases, and other chronic diseases like cancer, heart problems, stroke, and diabetes. In past research, a high-fiber diet has been shown to maintain gut bacteria and lower a woman’s breast cancer risk.

The study itself may have a few holes. For example, most of the participants examined had low sugar intake to begin with, which means their successful aging may have been impacted more by the low sugar in their diets, or proper nutrition beyond simply fiber. Regardless, the evidence seems to point in the direction of fiber resulting in good health in general — so a diet high in fiber can only mean positive things.

To get the right amount of fiber in your diet, avoid processed foods like canned fruits/vegetables, or white breads and pastas. When non-whole-grain wheats or cereals go through the refining process, the grain’s outer coat — which contains most of the fiber — is removed, so stick to whole grain foods, fresh fruits and vegetables, and legumes like beans and peas instead.

Source: Gopinath B, Flood V, Kifley A, Louie J, Mitchell P. Association Between Carbohydrate Nutrition and Successful Aging Over 10 Years. The Journals of Gerontology, Series A: Biological Sciences and Medical Sciences, 2016.