Ever scarfed down a Boston cream (or homemade brownie, or leftover baby shower cupcake) from the office pantry when you weren't the slightest bit hungry two minutes earlier? Then you know that simply laying eyes on a sweet treat can lead to a serious craving. Sugary foods qualify as "hyper-palatable"— and a visual is all it takes to trigger your neurons to release the feel-good chemical dopamine. In turn, dopamine amps up your desire to consume whatever delicious dessert is in front of you.

"A lot of people don’t make the connection that there’s something physiological happening when they see hyper-palatable foods,” says Eliza Kingsford, a psychotherapist and author of Brain-Powered Weight Loss. “This is not a signal that my body is hungry or needs nutrients. This is a dopamine response.”

The good news: there are simple tools you can use to manage those cravings. Here are eight tips that will help you sail right past the cookie jar.

Keep moving

Your first step: create distance between you and the goodies. If you're at work, head back to your desk. Salivating over a cake on a cooking show? Change the channel. Spot pudding on Instagram? Scroll quickly past. “Sometimes it’s as simple as out of sight, out of mind,” says Keri Gans, RD, author of The Small Change Diet. “Distancing yourself can lessen the craving.”

Distract yourself

Ok, so maybe you high-tailed it away from the cookie jar, but you’ve still got sugar on the brain. Turn your attention to something else ASAP, suggests Gans. Quickly text a friend, open an article to read, make a call, or go chat with a co-worker. “You want to do anything that’s not sitting there and thinking about the food,” says Gans.

Get mindful

There will be times—say, when you’re at a party or a buffet restaurant—that you can’t run away from the dessert tray, or turn to another activity that doesn't involve food. In this case, it can be helpful to use mindfulness practices: Step one is to slow down and observe how the craving feels, says Kingsford. “You’re now at a place of intentionality, where you can decide, What do I want to do with this craving?" If you decide not to cave, wait it out. Kingsford calls this urge surfing: “Urges come and go, like waves coming to shore, and if you don’t give in to them, they will go back out just as easily," she explains.

Savor a small bite

This only works for some people. If you've ever inhaled an entire bag of candy, you're probably not one of them. But if you know you can stop after a tiny portion, go for it. “Focus on the mouth feel, the sweetness, and be verbal about how great it is. ‘Wow, I love the way the frosting just melts on your tongue, and you can really taste the pumpkin in that!’ That can make it more satisfying.”

Set up realistic guidelines

Say you know you're heading into a temptation zone, like Halloween. Forgoing all treats from the office candy jar or your kids' stash may not work. But you might decide to have one piece twice a week to satisfy your cravings and stay in line with your healthy-eating goals, says Kingsford.

Make a negative association

Are you triggered by fluffy pancakes, or melty ice cream sandwiches in ads on TV? Consider the reality behind those commercials, says Kingsford: “There are billions of dollars poured into the marketing industry [to elicit] food cravings,” she says. “But what you’re really seeing in those images is sprayed-on lacquer, crazy chemicals to make foods melt a certain way, dyes and markers, and weird lighting. Would you actually eat that? No, that’s disgusting."

Consider how you’d feel if you indulged

Kingsford suggests asking yourself three questions: 1) Do I really want it? The answer to this one is almost always yes. 2) Will I feel shame and guilt if I eat it? “You might think, Yeah, if I eat the whole container of ice cream I might feel bad, but not if I have a few bites. Or maybe even a few bites would make you feel crappy," Kingsford says. 3) Revisit the first question: Do I really want it? “By the time most people get to this point they’ve realized they don’t really want the dessert that bad, and it’s not worth it.”

Keep a healthier version of a favorite treat on hand

If your mouth waters every time your co-worker opens a bag of M&Ms, try packing your own clean treat so you don’t feel deprived. For chocolate lovers, Gans recommends KIND Bars. Siggi’s vanilla yogurt or a piece of fruit can satisfy a sweet tooth. And if it's baked goods you crave, bring a homemade version sweetened with maple syrup instead of refined sugar.