You know what a craving for cookies feels like. And we’re all too familiar with the satisfyingly salty crunch we get from chomping on potato chip–followed by the urge to eat another, and another, and another. But have you ever wondered why we don’t feel the same way about broccoli? Or why you’ve probably never overheard someone say, “Gee, I could really go for a bag of fresh baby carrots right about now?” That relies on how our favorite snacks are made.

It may be yucky to think about, but there’s a whole lot of science that goes into the bag of chips you ate at lunch. The goal of junk food companies is like any other business: to make money. And what’s the easiest way for them to do that? Boost sales, of course. So, the companies behind our favorite snack cakes and corn chips engineer foods that get us addicted. That way, we keep buying more!

So, how did we get hooked on candy bars in the first place? It all lies in the taste and texture. Our bodies are naturally designed to crave sugar and salt. That’s because those are nutrients our ancient human ancestors needed to survive. We still need sugar and salt today, but we are getting far more of it than our bodies need. That’s because snack food companies take advantage of these cravings. Ever read the ingredients on the back of a box of cookies? Among many things, you’ll probably see the phrase, “Made with artificial or natural flavors.” These artificial flavors are chemically engineered to taste extra salty or sweet, which indulges our cravings. Unfortunately, thanks to all that extra flavor, our brain doesn’t know when to tell us to stop. Instead, we continue to want more, even after our body gets all of the nutrients it needs. That’s why it’s much too easy for one handful of popcorn to turn into six or seven.

Unfortunately, all these not-so-good-for-you goodies can wreak some serious havoc on a person’s health. Excess consumption of added sodium and extra sugar can lead to obesity, heart disease, stroke, and even cancer. The consequences can be even more serious for people with diabetes. All these artificial flavors can cause blood sugar spikes, which makes it harder for you to control your blood sugar levels over time. In addition, if weight loss is your goal, the extra calories that come with junk food can make it a real challenge.

So, what’s a person with diabetes–or anybody else, too–to do? There are a few general recommendations. First, shop the periphery or the outer edges of your grocery store. This is where the more natural foods, such as produce, meat, and dairy, are located. The middle shelves tend to be stocked with processed goods, chock full of added preservatives and flavors.

Next, take five. Ingredients, that is. Some dieticians recommend only eating foods with less than five ingredients. While this idea may take some skill and practice, it can help you rule out some of the worst snack food offenders. (Some brands of sugary cereal contain more than 27 different added chemicals and ingredients!) However, this approach may be a bit restricted for some, and it can rule out a couple packaged foods that can actually do the body good. (Think: granola bars.)

Finally, practice moderation! Too much of everything is never good, but there’s no harm in indulging your sweet (or salty) tooth every now and then. In fact, researchers have found that those who indulge in dessert–on occasion, of course–are more likely to lose weight have have lower blood blood pressure and cholesterol levels. The key lies in proper portion sizing. Instead of noshing on an entire sleeve of cookies, take two and put the rest away for tomorrow. If you’re feeling adventurous, try snacking on healthier versions of your favorite treats. Baked pita chips are an excellent fiber-filled alternative to traditional potato chips, and they still have the salty flavor we love. Try subbing dark chocolate for milk as a yummy post-dinner snack. Less sugar + more chocolately flavor = a treat we all can enjoy.

Featured photo courtesy of SteFou! on Flickr