Too much fat weighs down not just your body, but also your brain.

Obesity harms most organs in the body, and new research suggests the brain is no exception. What’s more, the researchers found that getting rid of excess fat actually improves brain function, reversing the ill effects of the extra weight. The new study, which focused on people who underwent bariatric surgery, found that the procedure had positive effects on the brain, but other research has shown that less invasive weight loss strategies, like exercise, can also reverse brain damage thought to be related to body fat.

Here’s why that matters: Obese men and women are estimated to be about 35% more likely to develop Alzheimer’s compared to people of a normal weight. Some research suggests that body fat ups the number of proteins in the brain that trigger a cascade of events that predispose someone to the disease, and other research in mice has suggested that fat cells release a substance called interleukin 1, which can cause severe inflammation and, in turn, gunk up the brain.

In a recent study, a team of researchers looked at 17 obese women prior to bariatric surgery and found that their brains metabolized sugars faster than the brains of a control group of women at a normal weight. The women underwent cognitive function tests before their surgery as well as after. The results show that after surgery, the obese women showed improvement in the troubling brain activity seen prior to going under the knife, and they performed better on their cognitive function tests—especially in the area of executive function, which is used during planning and organization. The findings suggest that the fat loss reversing its bad effects on the brain.

It is possible that the long-term “cerebral metabolic activity”—meaning the way the brains of obese people process sugars—leads to structural damage that can hasten or contribute to cognitive decline, the authors write in their paper.

Researchers are still trying to understand the exact effects of body fat on the brain, but one theory is that it’s a chain-of-events-type of scenario. For instance, insulin resistance has become linked to neurodegenerative diseases like Alzheimer’s because insulin resistance is associated with an increase in fatty acids, inflammation and oxidative stress. Insulin resistance is a metabolic disorder, that can be brought on by obesity. Other theories have to do with the effects of certain kinds of fat. The National Institutes of Health (NIH) points out that visceral fat, the most damaging type of body fat, ups a person’s likelihood of developing insulin resistance, and on top of that, belly fat can produce stress hormones that can also hinder cognition. Other research has shown that the stress hormones are tied to hunger signaling, and those disruptions can alter a person’s sense of hunger and fullness and can contribute to obesity.

“The more we understand about [body fat], the clearer it becomes that belly fat is its own disease-generating organism,” said Dr. Lenore Launer, chief of NIA’s Neuroepidemiology Section of the Laboratory of Epidemiology, Demography, and Biometry in an NIH statement.

Inflammation continues to be fingered as a culprit in the link between body fat and a variety of disorders, which include brain-related diseases, and even depression. Body fat, also referred to as adipose tissue, is thought to create substances that cause inflammation, and that could be at least one of the primary ways it irritates the brain.

The bottom line is that excess body fat has a laundry list of effects on the body, and none of them are good. But on the bright side, getting rid of that fat should reverse some of the blips body fat is leaving on the brain. Though not everyone needs to go under the knife.

Contact us at letters@time.com.