Growing older is inevitable. But growing more sedentary as you age doesn’t have to be. New research published in BMJ Open found that finding and playing a sport you enjoy could be the key to staying active well into older age.

Researchers from University College London analyzed data from 3,500 men over the course of 20 years and found (somewhat obviously) that those who regularly exercised in their 40s and 50s were more likely to remain active later on in life. The intriguing element of the study was that men who played sports were more likely to stay active than those who did other types of recreational activities like housework or gardening. Additionally, men who reported playing a sport for 25 years or more at the beginning of the study were five times more likely to still exercise regularly two decades later. (A good heads up for teens and twentysomethings as well.)

Aside from sports, the only physical activity that participants reported doing more of over time was walking at least 20 minutes per day, with the percentage who reported doing so increasing from 27 percent of participants to 72 percent by the end of the study.

If you haven’t yet found a sport you genuinely enjoy, it’s not too late, as participants who took up a sport later in mid-life were still more likely to be active in older age than those who never took one up at all. Daniel Aggio, a doctoral student at UCL who worked on the study also noted to TIME that though the study only surveyed men, he expects the results would apply to women .

The takeaway? Exercising, specifically playing a sport, can improve your chances of being physically active later in life. It’s an important and encouraging finding, as a great deal of research shows that regular exercise is fundamental to our physical, emotional and mental well-being.

Read more about the findings here.