Our country’s industrial age passed long ago, leaving many of our cities’ structural makeups — like New York City’s buildings — in its wake. Over the years, industry has given way to technological advancement, with many more people looking to be web and graphic designers than, say, construction workers. These people may be doing their brains a service, according to a new study, which found that people with more complex jobs could protect their memory and thinking in later life.

“These results suggest that more stimulating work environments may help people retain their thinking skills, and that this might be observed years after they have retired,” said study author Dr. Alan Gow, from the Center for Cognitive Aging and Cognitive Epidemiology in Edinburgh, Scotland, in a press release. “Our findings have helped to identify the kinds of job demands that preserve memory and thinking later on.”

Jobs that required people to deal with data or other people most frequently exercised the brain, which strengthens neuroplasticity — the brain’s ability to form new neural connections, new associations, and thus, better function. They found people who were social workers, lawyers, surgeons, architects, civil engineers, graphic designers, and musicians were all more likely to enjoy better memory at age 70. Meanwhile, those who worked in factories or construction, as well as bookbinders, painters, carpet layers, telephone operators, and food servers, were least likely to have good memory into old age.

Studies have shown that working with complex data and socializing constantly are good ways to improve cognitive functioning. A study from 2008, for example, found that people who spoke about social issues for just 10 minutes were able to achieve better scores on mental processing and working memory exams than those who just watched a 10-minute video from the show Seinfeld. Essentially, it all comes down to learning new things constantly and keeping track of various pieces of information (if you work with data), and creating new content, which results in a consistent workout for the brain.

For Gow’s study, 1,066 people in Scotland with an average age of 70 were tested for memory, processing speed, and general thinking ability. The team also looked at the complexity of each person’s job with regard to how often a person created their own work rather than copying, or instructed and negotiated with others rather than taking instructions or simply helping.

Admittedly, the researchers said that the difference was small between the cognitive retention among the two groups. They suggested that people with higher intelligence — IQs were also measured at age 11 — could just end up in more complex jobs. However, IQs only “explained about 50 percent of the variance in thinking abilities in later life, but did not account for all the difference,” Gow said. “That is, while it is true that people who have higher cognitive abilities are more likely to get more complex jobs, there still seems to be a small advantage gained from these complex jobs.”

Source: Gow A, Deary I, Smart E. Occupational complexity and lifetime cognitive abilities. Neurology. 2014.