Several parts of the country have banned trans fats from use in restaurants, given the overwhelming scientific evidence showing how bad they are for heart health. Research has also hinted that they may not be particularly good for the brain either, as people who eat more of the fats seem to have memory problems.

And now a study confirms this, finding that younger people who eat more trans fats have trouble recalling words they’ve recently memorized. So it’s good news that the FDA has just moved to ban trans fats from U.S. food completely.

Trans fats are mostly used to create a particular consistency in foods, rather than for taste.

The researchers looked at just over 1,000 men and women younger than 45 years of age. The participants filled out questionnaires about what kinds of foods they tended to consume. They also took tests involving a list of words they had to memorize and then recall later.

The people who ate more trans fats had the worst performance on the tests: with each additional gram of trans fats they daily consumed, they recalled about 0.75 fewer words. For those who ate the most trans fats, this was the equivalent of about 12 fewer words.

The results were true for both sexes, but there were many more men in the study, so the data were clearer for them. And when the researchers adjusted for other variables that might affect memory function, like age, exercise, education, ethnicity, and mood, the participants who ate more trans fats still performed more poorly than those who ate less.

Trans fats were most strongly linked to worse memory in men during their high productivity years,” said study author Beatrice A. Golomb in a statement. “Trans fat consumption has previously shown adverse associations to behavior and mood — other pillars of brain function. However, to our knowledge a relation to memory or cognition had not been shown.”

The FDA ban on trans fats in human food goes into effect in 2018. This means that companies that do use the fats in products like margarine, popcorn, and frosting will have to phase them out and find appropriate replacements. Trans fats are mostly used to create a particular consistency in foods, rather than for taste.

Once it was believed that trans fats were a healthier alternative to naturally occurring oils, but now we know that they bring a host of health problems with them, like inflammation, metabolic imbalances, artery-clogging plaques, and even depression. Now, memory problems may need to be added to the list.

The CDC estimates that between 10,000 and 20,000 heart attacks could be prevented if people stopped eating trans fats — and 3,000 to 7,000 coronary heart disease-related deaths. Hopefully, these predictions will become realities when trans fats are no longer used in processed foods. They do exist naturally in products like meat and dairy, so it will still be wise to monitor your consumption of even natural fatty foods, or at least eat them in moderation.

What is certain is that trans fats as additives will be a thing of the past in the near future. And this is definitely a good thing. “As I tell patients,” says Golomb, “while trans fats increase the shelf life of foods, they reduce the shelf life of people.”

The study was carried out at the UC San Diego School of Medicine and published in the journal PLOS ONE.