Close your eyes and think of the last gorgeous bottle of wine you opened. Remember what it sounded like as the cork popped out. Remember what it smelled like as you poured it, and then as you swilled it. Now remember what it tasted like. Here’s the thing: How did you know it was good?

One scientist says it’s all in your head. Not in the way that some have argued – that good wine is a hoax – but in the sense that it’s your brain that’s telling you what to make of what’s in your nose and mouth. In fact, your brain is actually creating the flavors in your wine.

That scientist is Yale professor of neuroscience Gordon Shepherd, in his new book, “Neuroenology: How the Brain Creates the Taste of Wine. Not only does wine appreciation happen in the brain, but Shepherd argues that the specific thing that wine does in your brain is actually remarkable and unique.

“We show that just as with creating the flavors of food, creating the flavors of wine engages more of the brain than any other human experience,” Shepherd writes in the introduction to his book. Just – wow.

How did Shepherd arrive at this conclusion? “I simply went through in sequence all the systems in the body,” he tells VinePair. “All the muscle systems and the coordination of the muscle systems and all the systems in the brain that are engaged from the moment you start to think about drinking the wine to actually inspecting it in the glass, then taking your first sip, what happens to that sip in the mouth, all the 26 muscles of the tongue and mouth that are involved, how the airflow is controlled in your throat, and how it engages retronasal smell.”

Retronasal smell is a signal we misinterpret as coming from the mouth, and it’s a major source of flavor. “Flavor is not in the food, wine taste is not in the wine; it’s created by the brain,” Shepherd explains. “Wine tasting is actually wine flavor, much of it from a sense of smell.”

He used color as an analogy to explain. Color is not an inherent quality of any object we see. Rather, color is determined by the wavelengths bouncing off the object and hitting our retina. “Once they strike our retinas and the processing by the brain begins, we can create our perceptions of different colors,” Shepherd says.

And just as color is not in the object, flavor is not in the food that we eat. It’s created by the brain. When we drink wine, what we’re actually doing is sending signals from the mouth and the retronasal smell to the brain, triggering cognitive computations that include emotions, memories, pattern recognition, value judgments, and – most importantly for wine — pleasure.

“The final criterion for many wine tasters is pleasure,” Shepherd says.

And pleasure is created in the brain, not the mouth. Not only that, but the processing our brains go through to interpret the taste of wine and translate it into pleasure is one of the brain’s most engaging processes, as far as Shepherd can tell. Still, he was nonplussed by some of the headlines that came out surrounding his book, like one that said that he believes flavor engages more of the brain than solving a math problem. “A math problem is a poor example because it only uses the brain,” he says. And while he did not say anything comparing math to wine, he admits that he isn’t sure it’s wrong. “One can speculate that it’s true—I think it is true—but you have to read the book.”

One point Shepherd makes is that saliva has an effect on wine. “Our bodies produce saliva all the time, and saliva has stuff in it — stuff that both dilutes the wine and interacts with it,” he told NPR. “So as soon as the wine enters your mouth, it immediately begins to change. For example, saliva contains enzymes that break down the molecules in the wine to create compounds that effervesce into the air to stimulate the smell receptors in your nose. This produces new compounds that were not originally in the wine — they were created by this interaction.”

This means that the amount of saliva you have – which is influenced by things like age and gender – will change the way you perceive wine. Not just those factors, either. Lots of things affect how people taste wine, like the time of day, or whether or not they’re depressed. “If we’re talking about smell, we have about 350 different kinds of olfactory receptors,” Shepherd told NPR. “They are not the same between individuals — yours will be different than mine. And they’re not always the same over the course of months or years. As the cells turn over, they can change.”