It’s easy to forget that the food we eat directly affects how we think and feel, but it does. Our brain is only responsible for 2% of our body weight, but uses up to 20% of our energy. It needs fuel to keep us alert, productive, and feeling good. The reason you sluggish or unable to focus might be as simple as the food you ate for lunch. Here’s what you need to know.

Not all carbs are created equal.

The majority of our energy comes from carbohydrates that the body digests into glucose. There are three types of carbs: sugar, starch, and fiber. This is important, because different types of carbohydrates affect the brain in different ways. Foods with a higher glycemic index—that means more sugar—will rapidly release glucose into the blood. Carbohydrates of this variety (think white bread) give us a swift burst of energy followed by an inevitable crash. We experience that dip after the rush because our blood sugar has dropped rather suddenly. In addition to those low energy levels, this crash will also shorten our attention span and worsen our mood.

The frontal lobes are actually so sensitive to a drop in glucose levels, that a change in cognitive functioning is one of the first signals that you may be lacking nutrients. Feeling hangry (angry when hungry) is a real thing. Your brain is trying to tell you something. Feed it.

For that steady release of glucose that will keep your mood and productivity stable, opt for the carbs found in oats, grains, and legumes. These foods are higher in fiber and will keep you going for longer.

Proteins affect our attention span.

Proteins and amino acids also influence how we feel and act. This is because amino acids are what make up neurotransmitters, the messengers in the brain that carry information from place to place. Their functioning affects our mood, how well we sleep, our ability to pay attention, and even our weight. This is why we feel subdued and relaxed after a meal low in protein but high in carbohydrates, like a hefty plate of pasta. Conversely, we feel more alert and attentive after a protein-rich meal, like eggs or skinless chicken. The fuel we give our brain to work with directly impacts how it performs.

The difference between good fats and bad fats.

The fats that do the most for the brain are omegas 3 and 6. The presence of these fatty acids keep the brain sharp, and have even been linked to preventing dementia. Fatty fish like salmon, anchovies, and sardines are great sources of omegas. If fish isn’t your thing, fatty acids can also be found in walnuts, soybeans, tofu, and flaxseeds. However you get them, omegas are essential to the production and maintenance of cell membranes in the brain.

On the flip side, eating too many trans or saturated fats actually has negative effects on the brain. You know these fats. They are found in baked goods like cookies, cakes, and donuts. They are also in greasy red meat like bacon, ribs, and hot dogs. As delicious as they may be, too many bad fats (and not enough good fatty acids) can hinder brain health and functioning.

Don’t forget about micronutrients.

Antioxidants are micronutrients that keep the brain working efficiently for an extended period of time. The antioxidants found in fruits and vegetables strengthen the brain, preventing brain cells from being destroyed by free radicals. Vitamins B6, B12, folic acid, and small amounts of iron, copper, zinc, and sodium are crucial to brain health. These micronutrients are what keep the brain from becoming susceptible to disease and decline.

The best diet is a diverse diet.

Eating a wide range of foods ensures the brain is getting the nutrients it needs from a variety of sources. You want to eliminate the possibility of consuming too much of one nutrient and not enough of another. A balanced diet doesn’t just keep the brain and body healthy, it also keeps your mood stable and improves cognitive performance.