By now, most even casual consumers of marijuana are familiar with “terpenes,” the compounds found in the essential oils of plants, responsible for a plant’s distinctive taste and aroma—and, with cannabis, which also play a role in how the plant affects the mind and body.

But according to a pair of scientists from the University of British Columbia, to find which terpenes a plant will produce, to determine if a cannabis plant will smell like skunk, funk or sweet apple pie, you can look at the plant’s genes.

Let us attempt to explain.

Terpenes are prized not only because they have profound impact on the humans who consume them, but because they’re not predictable. Similar or identical strains of cannabis will produce different levels of terpenes. (And as anyone who’s waded into cannabis genetics can tell you, “identical” strains, i.e. two varieties of Blue Dream, will have very different genetic makeups.) We have a fine idea of what terpenes are and what they do, but less of a handle on how to predict with precision what terpenes a finished product will have, and why.

“Concentrations and ratios of cannabinoids are relatively predictable for different strains,” the researchers wrote, “but terpene profiles are often unknown or unpredictable.”

We have a better idea now.

As reported in an article published in the journal Plos One on Wednesday, after studying both the genetic makeup and the terpene count of a variety of hemp called “Finola” and in a cut of Purple Kush, researchers Judith K. Booth, Jonathan E. Page and Jörg Bohlmann believe they’ve identified as many as 30 genes that may predict how a plant produces and synthesizes terpenes.

As the Vancouver Sun reported, the scientists looked at the genomes of cannabis plants to identify genes associated with resulting terpenes, or which genes lead to “terpene biosynthesis,” as they wrote. They believe they’ve found a “cannabis terpene synthases gene family”—that is, a set of genetic markers that determine how a plant produces terpenes—associated with terpenes including mycrene and limoene, the “fruity” and “piny” flavors found in many strains of popular cannabis, including Cookies, GG#4 and O.G. Kush.

What to do with this information, and why should you care?

Consumers can look forward to more and better terpy products, for one. Armed with this information, plant scientists can breed a plant to produce terpenes, or at least know what starting-off seed material will produce an aromatic product.

This is also a major step forward in cannabis genetics.

For a long time, plant breeding was focused on traits that would predict levels of THC and CBD. Now, we know terpenes play a role, along with cannabinoids, in determining a plant’s effect.

After this first step towards predicting a plant’s terpene count, someday, we may be able to expect marijuana producers to make available finely-tuned cannabis, for precisely the effect we’re seeking.

Thanks, science.