How does mint-flavored chewing gum have the mysterious ability to turn perfectly good water into an ice cold glacier? Is it a chemical reaction or just sheer wizardry? Actually, it’s neither, but rather an odd phenomenon known as thermal illusion.

Sensory illusions fool your mind's perception of its environment. They are used in many magicians’ illusions and are behind the strange visual mix-up that occurs during optical illusion games. Thermal illusions, as you may have guessed, fool your body’s perception of temperature.

The reason for the thermal illusion that results when mint flavoring is mixed with water is linked to a single protein known as transient receptor potential cation channel subfamily M member 8 (TRPM8), Mental Floss reported. When the temperature drops, this protein responds by allowing charged sodium and calcium (Na+ and Ca2+) particles to enter the cell. This chemical change causes the cells to send messages to the central nervous system, which we perceive as “feeling cold.”

Baby, It’s Cold Outside

It’s really a truly amazing and complex system, but like all things, there is a glitch. TRPM8 also reacts in response to compounds known as “cooling agents.” These include eucalyptol, icilin, and (you guessed it) menthol — the main ingredient in mint-flavored gums, mints, and cigarettes. When these compounds come into contact with your body, they cause the brain to perceive a temperature drop in your mouth, even though no physical temperature change occurs. When you drink something that is actually cold, like a glass of refreshing water, your cold receptors go into overhaul and make it seem like your mouth is in an artic freeze, when, in reality, it’s just slightly chilled.

Some Like It Hot

Menthol isn’t the only compound able to create a thermal illusion. Capsaicin, the chemical found in chili peppers, can cause a similar effect, only creating a false sensation of heat rather than cold. When capsaicin comes in contact with the mucous membrane in the mouth, nose, or skin, it binds to pain receptors known as TRPV1 receptors, Slate reported. These receptors are usually activated by heat, and when stimulated by the capsaicin, send the same “heat” sensation to the brain despite no actual temperature change. Once these receptors are activated, your brain believes that it is overheating and will go through lengths to cool itself off. This is why individuals often sweat or turn red when eating especially spicy food. Turning red is a side effect of capillary dilation, a response that helps heat to reach the surface of the body, where it can better radiate away.