Let’s talk about psilocybin. Over 200 species of mushrooms produce the psychedelic substance, which humans have imbibed for thousands of years. Now, along with several other psychedelics traditionally associated with black lit college dorm rooms and hippie communes, magic mushrooms are finding their way into psychiatry labs. A new study funded by the British government and released this week indicates that psilocybin may be a potent antidepressant. This echoes the findings of many lower-profile studies and indicates a future for the compound that no one would have expected a generation ago.

Preliminary research on psilocybin, initially begun in the 1960s, has shown that the drug is also effective in treating addiction, obsessive compulsive disorder, anxiety, and PTSD. It is, to use an anatomically concerning metaphor, a shot in the arm for the brain. Still, securing funding isn’t easy to do because ‘shrooms still have their fungal roots in stoner culture. The movie Knocked Up captured both the quintessential mushroom trip and the reason it’s still so maligned: In the film, a pair of bumbling delinquents played by Paul Rudd and Seth Rogen decide to eat ‘shrooms and hit up Cirque du Soleil. “This is the best idea I’ve ever had in my life.” Paul Rudd says. “I’m freaking out right now, man. The mushrooms are turning on me!” says Seth Rogen, moments later. An adult baby in diapers cackles, “Ba, ba.” A giant snail blinks in slow motion. “I can’t handle this shit, man,” Seth Rogen wails.

While it didn’t do psilocybin researchers any favors by reinforcing stoner bro stereotypes, Knocked Up didn’t get the trip wrong. Psilocybin — chemically known as 4-phosphoryloxy-dimethyltryptamine — does induce colorful, bizarre, and occasionally byzantine visual trips, together with characteristic feelings of anxiety and anticipation and the more-than-occasional waves of nausea and vomiting.

The hallucinations are triggered when psilocybin is broken down by the liver into a compound called psilocin, a process that takes anywhere from 15 minutes to an hour. Floating through the bloodstream toward the brain, psilocin binds receptors known as serotonin 2A receptors, which normally bind serotonin (duh) and are found scattered throughout the brain. It’s thought that psilocin activates these receptors, making the cortex — the brain’s outer layer — more excitable and changing the way it responds to visual signals.

The drug’s “mind-expanding” effects seem to be linked to the serotonin receptors as well. Normally, they’re involved in regulating our mood, motivation, and, importantly, sleep; in 2014, one small-scale study found that the brain on mushrooms isn’t that different from the dreaming brain, showing higher activity in the parts of the brain linked to emotional thinking and less signaling in the parts involved in higher-level thinking, including self-consciousness and the sense of identity.

The science is still under investigation, but researchers are betting that changes in activity in these brain regions underlies the “ego dissolution,” “new perspectives,” and “religious awakenings” that mushroom users so often describe the trip — and perhaps the relief from depression and other mental illnesses that’s increasingly being linked to the drug’s effects.

As for the puking? That’s most likely an unfortunate after effect of the nausea, which is, no doubt, exacerbated by the swirling visuals. But whether the old myth that mushroom trips are really just food poisoning depends on how you define “poison.” The FDA’s “Bad Bug Book” — yes, that’s a thing — classifies psilocybin as a “mushroom toxin” and naively defines the toxic event as “a syndrome similar to alcohol intoxication (sometimes accompanied by hallucinations).”

Food poisoning never sounded so good.