For years, children with ADHD have been branded as distracting, and told to be quiet, sit still, and concentrate. According to a new study though, the movements that children with ADHD do while trying to work, such as tapping their feet or fidgeting, are actually required for them to process information and perform cognitive functions to the extent of their abilities. Children with ADHD perform better when they’re allowed to move while thinking.

The study, conducted at the University of Central Florida and published in the Journal of Abnormal Child Psychology, found that these movements serve a purpose, and an important one. 52 boys aged 8 to 12, were surveyed. 29 had ADHD, while the other 23 did not. The boys were given a variety of standardized tasks to test “working memory,” which is the system that allows us to carry out complex tasks like learning.

The study taught us two important things about ADHD. First, when allowed to move, the boys with ADHD performed much better than when they weren’t allowed to fidget. The movements actually helped their working memory, which ties into the other point. Those movements are not constant, they only occur when they use their brains’ executive functions, specifically, their working memory. When kids with ADHD are tapping their feet or otherwise fidgeting, that’s when their brains are doing the most work, and preventing them from moving make it harder to complete tasks.

The researchers suggest that allowing kids with ADHD to move will help them, though they can’t just run around the classroom distracting everyone. Instead they suggest having the children sit at exercise balls or on stationary bikes so that they can move while still pretty much staying in place.

Interestingly enough, movement isn’t a two way street. Children without ADHD, when asked to fidget and otherwise move while performing the assigned tasks, performed worse than normal.