Being forced to learn French or Spanish in school might seem like a chore, but according to a new study, you might want to thank your teachers for the brain boost.

The study, published this week by Pennsylvania State University, took a group of 39 people and asked half of them to learn new Chinese words. The result: Those who were most successful at the task had better-connected brain networks and “functional changes” in the brain as a result of the exercise.

“Learning and practicing something, for instance a second language, strengthens the brain,” professor Ping Li, who led the study, said in a statement. “Like physical exercise, the more you use specific areas of your brain, the more it grows and gets stronger.”

Researchers might be able to predict how easily you can learn a new language by observing your brain network.Source: Ping Li Lab

According to one study, the effect of speaking multiple languages was comparable to “the effect of variation in the gene for apolipoprotein E (which is linked to Alzheimer’s), physical fitness and (not) smoking.”

What’s unique about the Penn State study is that it provided brain imaging evidence showing how the human brain changes and becomes better integrated when it’s forced to learn a new language, no matter the age of the learner.

“A very interesting finding is that, contrary to previous studies, the brain is much more plastic than we thought,” Li said. “We can still see anatomical changes in the brain [in the elderly], which is very encouraging news for aging. And learning a new language can help lead to more graceful aging.”

So while some people might naturally have an advantage when it comes to picking up a new language, just making an effort to learn one might help keep your brain fit and healthy as you grow older.