Happy? Eat to celebrate. Sad? Eat to comfort. Bored? Eat for the heck of it.

It’s a well-established fact that people eat for all sorts of non-hunger related reasons, particularly emotional highs and lows. But, a new study suggests that environment may be playing a bigger role in how much we eat than we had realized.

A study at Cornell University found that people were more likely to overeat in a cluttered environment than in a clean one, reports NPR:

“They set up two kitchens. One kitchen was neat and tidy. The other was strewn with mail, newspapers and dirty dishes. ‘It was a mess,’ Wansink said.

Then, they recruited women to participate in the study.

‘We brought 100 people into [the] kitchens — just one at a time,’ he explained. The participants were given a writing assignment. Some were told to write about a time they felt out of control. Others were to write about a time when they felt in control.

The participants were also given snacks — including cookies, crackers and carrots. (The snacks were the same in both kitchens.) And all were told: ‘Feel free to eat as much as you want, because we have tons of this food.’”

Women who were in the messy kitchen tended to eat twice as many cookies as those in the clean kitchen, but women in the messy kitchen who wrote about a time they felt in control consumed fewer calories than the women who wrote about feeling out of control.

The researchers concluded that chaotic environments can lead to overeating, but that frame of mind can counteract those affects: “The results suggest than an individual’s mindset can moderate the impact of a chaotic environment on food intake, particularly for sweet foods.”

The hope in identifying environmental factors that lead to overeating is that people will be able to make situational alterations to their lives to maintain a healthier weight, which the researchers called “helping us become more slim by design.”

“Masters of change” Chip Heath and Dan Heath say in their book Switch, “What looks like a people problem is often a situation problem.” So, perhaps there’s hope that this country can get its obesity epidemic under control with some changes in environment.