You had a fantastic breakfast of oatmeal with low-fat milk and berries, a mid-morning apple and almonds, and a salad for lunch. Then 3 pm rolls around and it hits you: those cookies your co-worker brought into the office seem just too irresistible to pass up. You start thinking about them more than your work . . . more than your significant other . . . more than anything that exists on earth. Ever have a craving?

I wish I could tell you that there’s one cause of cravings and if we solved that then we’d all miraculously have the willpower to resist high-calorie treats. Of course, that’s not the case and in fact, sometimes we want to have (and enjoy) our cake. But we should be able to enjoy it on our terms, not because of a “sudden urge” that often leaves us feeling guilty afterward.

The key then is to become aware of and determine what triggers cravings for you and then brainstorm solutions that allow you to prevent or handle them better. From my experience working with clients, here are three of the most common reasons for cravings:

Hunger: We tend to make less ideal food choices when we are ravenously hungry. This is one of the biggest reasons I advocate small, frequent meals. If you go more than four hours or so without eating, your blood sugars will likely start dropping to the point that any food around you becomes deliciously tempting, even if it’s not a healthy option.

Planning small snacks for mid-morning and mid-afternoon between meals can go a long way in reducing cravings and keeping you feeling energized all day long. Some examples of great snack options: piece of low-fat string cheese and fruit, a palmful of your favorite nuts or half a sandwich. Also, stay hydrated throughout the day because very often we will eat when we are in fact thirsty.

Habit: What causes you to want chips with your sandwich? Or soda with a slice of pizza? Or something sweet after dinner? Sometimes eating habits we’ve developed through repetition cause our brain to go on auto-pilot whenever we hit a particular situation, even if it means eating food we really don’t want to have. But we justify it by thinking and believing that we just “need” a particular food because that’s how we’ve always done it. But you haven’t always done it. You were not born needing a dessert after dinner. We’ve just trained ourselves to be that way.

So next time you sense a craving due to a habitual situation, stop for a moment and consider a better alternative. Do this a few times in a particular situation, then it may become your new, healthier habit. Here are some examples: consider having some crunchy veggies instead of chips with your sandwich, have some naturally-flavored seltzer instead of soda with your pizza or try a Greek yogurt parfait in place of ice cream for dessert after dinner.

Availability: Often we will eat foods just because they are there, staring at us in the face. Two of the best examples are the bread basket at dinner and picking at your dinner plate after you are full. And, think about how many times you’ve eaten foods that you would not have bought yourself, but decided to indulge in because they were free and available, like when your co-worker decided to buy a dozen donuts for the office.

Consider the adage, “Out of sight, out of mind.” If you don’t have tempting foods around at home (cake, cookies, ice cream, etc.) and stock healthy alternatives (nuts, dates, dark chocolate, cereal, Greek yogurt) then you will be much more inclined to make better choices since you don’t have lousy ones available! Or you can take control of your environment at restaurants by asking your server to remove or only bring one piece of bread instead of a bucket. Finally, if you are confronted with free food take a moment and ask yourself, “Would I pay for this food?” If no, reconsider whether it’s worth eating for free. Or, make sure you have a healthy snack available as an alternative (see “hunger” above).