IF YOU’RE HOOKED to one of the deadliest bad habits—like binge-eating artery-clogging foods, drinking alcohol in excess, or smoking cigarettes—and these vices have a hold on your self-control, then the best fix might be a little sweat therapy.

That’s right: Exercise is one of the healthiest and most effective methods to ditch a bad habit (even if it’s not the easiest method).

Here, clinical sport psychologist Gloria Petruzzelli, M.D., highlights how and why working out has such a powerful, positive influence on your life.

1. Exercise lights up your reward center and circulates feel-good chemicals

“Humans are learning creatures, so if you grew up seeing your parents use alcohol, cigarettes, or food to deal with stress, or other emotions, you’re more likely to repeat that pattern,” Petruzzelli says. Plus, most bad habits hit all your pleasure marks. Anything that feels good in the moment is something you’re going to want to experience again, right?

Here’s the problem: When your brain experiences pleasurable stimulation, dopamine—the “reward chemical”—floods your brain. So, even though you know you’re doing something “bad,” it’s really difficult to kick because your body craves that high.

“Luckily, like bad habits, exercise also stimulates pleasurable neurochemicals, such as endorphins, serotonin, and dopamine, so it’ll only be a matter of time before your brain gets fixated on working out,” she says.

2. Working out dulls withdrawal symptoms

“Others struggle to quit bad habits because they experience emotional distress when the ‘habit’ is removed, which we call withdrawal symptoms,” Petruzzelli says. The fix? Moderate-intensity exercise lessens the desire to smoke and dulls withdrawal backlash, research shows. Exercise can curb irritability, stress, depression, and restlessness, researchers say.

The next time you’re itching for a cigarette or drink, do some bodyweight moves, like pushups, burpees, and mountain climbers—seriously, it works. Exercising diverts your attention and curbs the craving. (And if binge-eating is your affliction, or you use it to dampen negative feelings, exercise also decreases appetite because it suppresses ghrelin, the hunger hormone, according to research from the American Physiological Society.)

3. Training gives you a sense of purpose

When you create a goal—say, “run a marathon” or “lose 20lbs”—you’re more apt to banish a bad habit. Makes sense, right? You’re putting your free time and attention toward something healthy.

But for training to really stick, you’ll need a powerful reason to keep you coming back to the gym.

“Your ‘why’ must be associated with something deeply meaningful to you,” Petruzzelli says. “For example, you could have gotten test results back from a physical indicating you’re on the cusp of becoming diabetic.” That’s a powerful reason to kick unhealthy eating and lifestyle habits. Likewise, if you have zero energy, get out of breath easily, and can’t keep up in your rec league or with your kids, that’s going to motivate you to make some major changes.