It’s long been known that spending an extended period of time in space can have detrimental effects on the human body. Changes like muscle degradation can be offset by exercise regimens, but new research suggests that microgravity can affect the human brain in ways that science is still struggling to grasp. A research team led by Rachael Seidler, a professor at the University of Michigan, took MRI scans of over 20 astronauts before and after spaceflights of various lengths, and some of the changes observed are shocking.

A total of 26 astronauts were scanned before and after their stays in space: 12 who were shuttle crew members spending two weeks in space, and 14 who resided on the International Space Station for six months at a time. After comparing the scans, the scientists discovered that every single one of them showed noticeable changes in the amount of gray matter in various sections of their brains.

“We found large regions of gray matter volume decreases, which could be related to redistribution of cerebrospinal fluid in space,” Seidler explained in a post detailing the study. “Gravity is not available to pull fluids down in the body, resulting in so-called puffy face in space. This may result in a shift of brain position or compression.”

In short, the lack of gravity actually changed the physical shape of the astronauts’ brains, but there’s more. The scans showed that areas that saw increases in gray matter were the sections that process movement information, and more specifically the movement of a person’s legs. The team believes that may be related to the brain working harder to learn new ways of moving related to the lack of gravity. The scans also showed that the changes were more dramatic in the astronauts who spent months aboard the ISS as opposed to those who only had brief trips aboard the shuttle.

The next step for the team is to determine how long the brain changes actually last, and whether trips into space have permanent or extremely long-lasting effects.