Prison guards have tense working environments, but some are finding that focusing on the rhythm of their breathing and the different sensations all around them can reduce their stress and improve their lives in the same way those mindfulness activities improve the mental health of people with anxiety and depression.

According to the Huffington Post, corrections officers in Oregon who practice mindfulness are seeing even physical health benefits, and their improved mental wellbeing might be making prisons safer, as it helps them “stay relaxed and less forceful during de-escalation processes with inmates.” Those prison guards have high rates of post-traumatic stress disorder, depression, suicide, alcoholism, divorce and obesity, the Huffington Post says, in part because of mental and social consequences of experiencing a dangerous work environment. But to help them, Oregon’s Department of Corrections is implementing mindfulness exercises aimed at improving their quality of life.

Read: 5 Mindfulness Hacks For Anxiety That Are Easy To Hide In Public Or The Office

Mindfulness involves refocusing the senses to pay more attention to what is happening in the moment and our own thoughts. That could be taking notice of the different sights and smells around us or the feeling of air entering and exiting our lungs. For people with anxiety, mindfulness can pull attention away from negative, repetitive thoughts.

Matthew Zeller, a correctional sergeant in Oregon, told the Huffington Post that mindfulness taught him how to take care of himself in a different way from his professional training. “When you keep everything inside, something’s bound to break,” he said. But he can now communicate better “and I think the inmates see that too.” The exercises have also lowered his blood pressure.

The U.S. Bureau of Labor Statistics puts the number of correctional officers in the country at almost 430,000, while inmates are in the millions. It’s possible mindfulness could help that latter group as well — a documentary on one of Mexico’s formerly most violent prisons showed that meditation had reduced suicide, violence and solitary confinements in that overcrowded and dangerous facility.

Read: My One-Week Prison Food Diet