Good news for stress cases: according to a new study by researchers from the University of Southern California, stress and anxiety doesn’t just force you to resort to bad habits, but can in fact lead people to fall back on good habits as well.

In a study published in Journal of Personality and Social Psychology, USC Professor of Psychology and Business Wendy Wood and former Assistant Professor of Psychology David Neal conducted a series of five experiments that are challenging the established belief that people can only resort to detrimental habits when stressed and anxiety due to limited capacty for self-control.

But according to Wood, it turns out we’re actually as prone to engage in healthy, productive habits when stressed as we are destructively indulgent ones. Why? Despite the belief that bad habits are the result of people seeking a reward in times of anxiety, Wood’s research suggests that humans simply fall back onto whatever is routine when stressed, good or bad.

“When we try to change our behavior, we strategize about our motivation and self-control. But what we should be thinking about instead is how to set up new habits. Habits persist even when we’re tired and don’t have the energy to exert self-control,” said Wood in an interview with USC News.

Wood suggests that stress results in a lack of initiative to try new things, meaning that the focus on self-restraint when attempting to stop bad habits is not the best method.

“Everybody gets stressed. The whole focus on controlling your behavior may not actually be the best way to get people to meet goals,” she says. “If you are somebody who doesn’t have a lot of willpower, our study showed that habits are even more important.”

The researchers found that students who already have unhealthy diets will turn to junk food when stressed in higher quantities, but those who already had established healthy eating patterns are more likely to eat better on the morning of a final exam. The same was true of people who read newspaper before class, or go to the gym; even when time is crunched, those students were more likely to engage in those habits on test days than not.

“You might expect that when students were stressed and had little time, they wouldn’t read the paper at all, but instead they fell back on their reading habits,” said Wood. “Habits don’t require much willpower and thought and deliberation.”

The result, according to Wood, is that a change in behavior requires more repetition than it does willpower. The trick then becomes simply making an effort to try new, healthy behaviors in times of low-stress and by easing into those new habits slowly, rather than force yourself to completely change overight . Essentially, the key is repetition, not willpower.

“[T]he central question for behavior change efforts should be, how can you form healthy, productive habits?” said Wood. “What we know about habit formation is that you want to make the behavior easy to perform, so that people repeat it often and it becomes part of their daily routine.”