It involves talking to yourself.

Mandy Oaklander, TIME
December 20, 2016

So convincing are the health benefits of exercise that it’s a wonder we don’t all run to work every day. That’s until you consider the downside of exercise, of course: it’s hard, sweaty and uncomfortable.

That’s especially true in a hot environment. When you work out in the heat, your body shuttles more blood to the skin in order to help heat escape—meaning less blood flows to the muscles and brain, causing fatigue to set in faster. But now, in a new study, a group of researchers wanted to see if a person could overcome the negative effects of being in a hot space just by thinking about their sweat session differently.

“If there are changes going on, can we use psychological tools to improve our tolerance to heat and reduce how uncomfortable it makes us?” wondered Stephen Cheung, professor and a Canada Research Chair at Brock University in Ontario, who is an author of the small new study published in the journal Medicine & Science in Sports & Exercise. Could those same tools also make people better exercisers?

Cheung and his colleagues had 18 competitive cyclists do an intense exercise session in the heat. Nine of the cyclists then took two weeks to train as normal. The other nine received sessions in motivational skills training, a kind of self-talk that involves “reframing” negative feelings—like how hot it is—into positive ones. Instead of thinking “My legs are burning” or “I’m sweating like crazy,” they were taught to come up with more positive, empowering phrases like “I’m doing well” or “I can handle this.”

At the end of two weeks, everyone came back to do the hot-exercise test again. The first group saw no change in their performance. But the experimental group “improved a huge amount,” Cheung says. They were able to pedal for 25% longer than they were initially, and they could sustain high levels of discomfort for a lot longer than their peers. Their body temperatures were also hotter than those of their peers, suggesting that the brain has a lot of power in determining how far the body is able to push itself.

The results aren’t likely to shock athletes, who know that the mind is often the first thing to get tired. “It’s really ultimately the brain that lets you down,” Cheung says. “You can go a lot harder than a lot of times you think you can.” What is surprising is that the words you tell yourself can make such a difference. “Even in the face of strong physiological cues to stop,” Cheung says, “the brain can still override them.”

This article originally appeared on Time.com.