Today, cannabis continues its slow march toward nationwide decriminalization with voters deciding whether to allow recreational use in Michigan and North Dakota, and for medical purposes in Utah and Missouri. As states keep chipping away at federal prohibition, more consumers will gain access, sure—but so will more researchers who can more easily study this astonishingly complex and still mysterious plant.

At the top of the list of mysteries is how a galaxy of compounds in the plant combine to produce a galaxy of medical (and, of course, recreational) effects. For example, THC feels different when combined it with cannabidiol, or CBD, another naturally occurring compound in cannabis, but the reasons aren’t fully known. It’s called the entourage effect: THC, like a rock star, only reaches its full potential when it rolls with a crew, consisting of hundreds of other compounds in the plant that scientists know about so far.

But the problem with researching a schedule I drug is that the government doesn’t want you to do it. Yet as more states go legal, cannabis continues to climb out of the scientific dark ages. Because it’s not just about giving people a comfortable high, but about developing cannabis into drugs that could treat a massive range of ills.

First, some cannabis basics. THC and CBD are cannabinoids, which means they bind to receptors in the human body’s endocannabinoid system, specifically the CB1 and CB2 receptors. Researchers only discovered the endocannabinoid system in the early 1990s, but it appears to regulate things like mood and immune function.

You may have noticed that cannabis’ effects can differ wildly from experience to experience. Eat a weed brownie, for instance, and the THC goes straight to your liver, where it’s metabolized into 11-hydroxy-THC. That metabolite “has five times the activity at the CB1 receptor, the psychoactive one, as THC itself,” says Jeff Raber, CEO of the Werc Shop, a cannabis lab in California.

That’s why it’s so easy to overdo it with edibles. When you smoke cannabis, the THC at first skips the liver and goes straight to your bloodstream. It’s about five times less potent that way than if you eat cannabis, meaning that chowing down on 10 milligrams of THC is roughly equal to smoking 50 milligrams of the stuff.

Mode of ingestion, then, is a big consideration in the cannabis experience. But so too are factors beyond your control. “We're pretty aware that the endocannabinoid system is not a static picture throughout the day,” says Raber. “Why it changes, what causes those changes—those are other levels of complicated questions.” Cannabis might hit you differently during the day than at night, and can also depend on your mood or whether you’ve eaten.

But that’s not all. THC also interacts with other cannabinoids in your system, and it has a complicated relationship with CBD in particular. Anecdotally, cannabis users have reported that CBD can modulate the psychoactive effects of THC—think of it sort of like an antidote to the paranoia and anxiety that comes with being too high. That might be part of the reason edibles can feel so powerful: If you eat a brownie loaded with just THC, you aren’t getting the CBD you would if you smoked regular old flower. (Not that some manufacturers aren’t also adding CBD to their edibles. CBD is so hot right now, but it's hard to find flower with high CBD. Cultivators have over the decades bred highly intoxicating, THC-rich strains at the expense of CBD.)

With cannabis growing more legitimate as a medicine, researchers are finally putting hard data to these anecdotal reports. They’re beginning to understand how CBD might modulate the often unwelcome effects of THC.