Run, swim, lift weights, do yoga—do something, because it’s good for you. As tiring (or inspiring) as these exhortations to get physical can be, many studies tell us that regular exercise not only helps our bodies but improves memory, enhances mood and soothes anxiety. But what is happening the mind during workout to create all these benefits?

A new study from Sweden suggests that a specific protein found in toned muscles might contribute to exercise's mental benefits. This protein, the researchers found, might help our bodies process molecules that, if out of balance, can stress us and contribute to depression. The findings were published in the journal Cell.

To test this, the researchers kept some mice on edge for weeks by bombarding them with flashing lights, loud noises and interrupting their sleep. Predictably, this treatment gives you mice that show symptoms and biochemical markers of depression.

But not all the mice showed those systems. One group, specially bred to have high levels of a protein called PGC-1alpha1 (the one in toned muscles), did not show those depression signs. Turns out, PGC-1alpha1 boosts production of an enzyme that breaks down a chemical called kynurenine. Kynurenine helps the body respond to an activated immune system, but it also plays a role in depression and tic disorders.

“Our initial research hypothesis was that trained muscle would produce a substance with beneficial effects on the brain,” Jorge Ruas of the Karolinska Institutet and one of the study’s authors, told Forbes.com. “We actually found the opposite: well-trained muscle produces an enzyme that purges the body of harmful substances. So in this context the muscle’s function is reminiscent of that of the kidney or the liver.”

This study was in mice, but it lines up nicely with all the other lines of evidence that exercise is good for mental health. Add this effect to exercise’s endorphin rush you have a potent mood enhancer, no drugs need.