If you want to stay cognitively sharp with age, there’s at least one thing you should start doing today. Engaging in activities like continuing education (like learning a new language) or stepping into a leadership role at work can help fend off cognitive issues like dementia later on, according to a new study published in PLOS Medicine.

The study was led by researchers at the University of Exeter in collaboration with the universities of Bangor, Newcastle and Cambridge. They analyzed the mental fitness of 2,315 people over the age of 65, looking to see if challenging experiences in early or mid-life would make the brain “more resilient” to aging, according to the study’s press release. They found that people who had engaged in intellectually challenging experiences earlier on had higher “cognitive reserve,” which helped them stay “mentally fit for longer.”

“Losing mental ability is not inevitable later in life,” Linda Clare, professor of clinical psychology of aging and dementia at the University of Exeter, said in the study’s press release. She added that when the brain is “stretched” and challenged, it has to use a “variety of networks” which builds a “buffer” that can help protect against decline.

The researchers also found that eating a healthy diet, getting more physical activity, moderate alcohol consumption and staying socially active can protect brain health in older age.

Overall, these findings support the idea that the future of our health really is in own hands. If we can implement habits and take actions that are good for our mental health, we can help keep our cognition sharp as we age.

Read more about the findings here.