Let’s talk about whip-its. The little silver vials, like tiny nitrous oxide-filled scuba tanks, traditionally live inside whipped cream canisters but are more likely to be found, these days, at high school parties, in college dorms, and in Williamsburg closets. You’ll probably also find them, in their super-sized form, at the dentist’s office. After all, the “whipped cream propellant,” as the drug gurus at Erowid call it, is nothing but laughing gas.

As Abbi Abrams beautifully illustrated in a psychedelic laughing gas-induced dance party on Broad City, breathing in nitrous oxide is inhaling euphoria. Its effects are, ironically, most alluringly laid out by a California state law prohibiting its use to induce “intoxication, elation, euphoria, dizziness, stupefaction, or dulling of the senses or for the purpose of, in any manner, changing, distorting, or disturbing the audio, visual, or mental processes.” It is, however, allowed to be used as a potent painkiller and anesthetic, which is why it’s still legal, at least on the national scale

The Cornish chemist Humphry Davy became the first nitrous freak when he noticed its painkilling effects in 1799, 27 years after it was first isolated. His pal and fellow gas head (and future British Poet Laureate) Robert Southey extolled its virtues in a letter to his brother:

O, Tom! Such a gas has Davy discovered, the gaseous oxyd! O, Tom! I have had some; it made me laugh and tingle in every toe and finger-tip. Davy has actually invented a new pleasure for which language has no name. O, Tom! I am going for more this evening; it makes one strong and so happy, so gloriously happy! O, excellent air-bag!

What Southey and Davy were really turning up on were the excellent air’s painkilling and anxiety-killing effects. Scientists still aren’t sure how it carries out its magic, but they’ve been able to draw parallels between its mechanisms and those of other, more common drugs.

It carries out its painkilling effects, for example, in roughly same way that opioids do — that is, by specifically activating the brain’s kappa-subtype opioid receptors, which have been implicated in numbing pain. Nitrous oxide is thought to do this by telling the nervous system to release certain types of neuromodulators, which latch onto the kappa opioid receptors and thereby signal to the brain that the pain is gone.

And it dulls anxiety, albeit briefly — its half-life in the body is about five minutes — by mimicking the way benzodiazepines calm us down — that is, by making neurons less likely to chatter to one another, thus creating a quieting effect. Researchers suspect nitrous oxide tells the body to release a different brand of neuromodulator that binds to GABA-A receptors and makes them less sensitive to signaling.

Fun, right? The minor greenhouse gas also appears to prevent bad memories from forming at high doses. Unfortunately, inhaling too much of anything that’s not oxygen tends to end in a little thing called suffocation, which in turn can lead to blacking out. Sometimes this is what you’re aiming for — root canals are no fun when you’re conscious — but controlling dosage is best left to the professionals; most whip-it deaths happen when users pass out unintentionally and undergo accidental head trauma.

Photos via Comedy Central