Whiskey drinkers know that the moment they swirl a bit of the smoky spirit in their mouth, they’re bound to find a world of flavors: some oak, some smoke, a little vanilla, maybe a slight bite from tannin. Brown liquors — from scotch to bourbon and all the whiskeys in between — are complex spirits that lend themselves to purposeful tasting, creating connoisseurs willing to shell out top dollar for the most peaty scotch or their favorite spicy bourbon. When it comes to the magic of whiskey, their complex profiles might be explained by the chemical fingerprints that separate them from one another — and change the way that they taste.

It’s an idea that the aptly-named Tom Collins, a researcher at the University of California, Davis, is actively pursuing. “I worked on my Ph.D., and it was a project looking at aroma and flavor chemistry in wine in oak barrels,” Collins explains, crediting the barrels with sparking his initial interest in the chemistry of spirits. “It sort of seemed a natural extension to look from the chemistry of wine to the chemistry of whiskeys, because the chemistry of oak barrels play a huge role in what you see in whiskeys of all sorts.”

Collins and researchers at Davis set out to see if they could determine the chemical differences among 60 different whiskeys: 38 straight bourbon whiskeys, 10 rye whiskeys, five Tennessee whiskeys and seven other American whiskeys, varying in age from two-to-15 years old. What they found was a spectacular testament to the spirit’s complex chemistry–over 4,000 different non-volatile compounds across the different samples, results which he presented today at the 246th National Meeting & Exposition of the American Chemical Society. “It’s very complex,” Collins says of the chemistry. “There are components that are barrel derived, as we would expect, but there are also things that are related to the grains that are used to make the distillates in the first place—so the corn and wheat and rye and things that are fermented to form the distillate. We see some components that appear to be grain related, and there are also likely to be components that are derived from the yeast that are used do the fermentation.”

Of the thousands of chemical compounds Collins found, there was a fair amount of overlap between the different spirits. But Collins found that each spirit contained unique compounds, or unique concentrations of compounds, that he could use to distinguish a scotch from a bourbon, or a Tennessee whiskey from a bourbon, simply by looking at the liquor’s chemistry. “If you try to make sense of all of the components that are there, it’s essentially overwhelming, but if you filter out the things that are not used in Tennessee whiskeys, or things that are only present in some of the bourbons, you can sort of whittle away down to the things that define what a bourbon is or what a Tennessee whiskey is chemically,” Collins said.

It might be the perfect answer that eternal question of novice whiskey drinkers everywhere: what exactly is the difference between a whiskey and a bourbon?

The confusing answer is that bourbon is always whiskey, but all whiskey isn’t bourbon. This has always been true from a historical and regulatory perspective. Historian Michael Veach spoke with Food and Think in June and dispelled the myths that bourbon has its roots in Bourbon County, Kentucky, and that all bourbons must originate there. “‘People started asking for ‘that whiskey they sell on Bourbon Street,’ Veach says, ‘which eventually became ‘that bourbon whiskey.’”

The regulatory distinction presents a slight complication: some Tennessee whiskeys, from a regulatory standpoint, actually qualify as bourbons, but choose not to market themselves as such (Jack Daniels, for example, adamantly markets itself as a Tennessee whiskey, even when it meets regulatory standards for being a bourbon). Natalie Wolchover at Live Science outlines the regulatory standards for bourbon:

While bourbon whiskey has its roots in Kentucky, and continues to be primarily produced there, it is now manufactured in distilleries all over the United States. Manufacturers must meet the following requirements in order to advertise their whiskey product as “bourbon”:

It must be produced in the U.S. from a grain mixture (called “mash”) made up of at least 51 percent corn. It must be distilled to a maximum strength of 160 proof, bottled at a strength of at least 80 proof, and barreled for aging at no more than 125 proof. It must be aged in new, charred oak barrels. To qualify as “straight bourbon,” the spirits must meet the above requirements as well as being aged for at least two years and containing no added coloring, flavoring or other spirits.

Many bourbon whiskey distilleries in Kentucky advertise their use of unique water filtered by the limestone shelf in Bourbon County; while this feature may add to the allure of Kentucky bourbon whiskey, the federal trade regulations do not stipulate about what water must be used.

Collins thinks he might have a more chemically elegant answer to the conundrum. As his team discovered, there are 50 to 100 chemical compounds such as fatty acids and tannins that can be used to distinguish a Tennessee whiskey from a bourbon to such an extent that Collins can tell the difference between them without tasting either. Chemically, it’s often a question of concentration–how much of a plant derived compound does a spirit have? How much tannin? “There are, in many cases, certain compounds that are only found in one or the other, but more often, there are compounds that are present in both but at different concentrations. Those are the tannins, the fatty acids, and in some cases, turpentine – compounds that are plant-derived.”

These compounds complicate the matter further–certain chemicals are extracted from the wood barrels during the aging process, which might not be unique to the distillate itself. As Collins notes, barrels are, after all, made from trees–an unarguable plant substance. So how do they discern the unique plant-derived elements in the distillates from the compounds that might come from the barrel? “Some of the ways we get through that is to look at whiskeys that have been freshly distilled, and haven’t been put in barrels yet, so we can see what’s there in the fresh distillate before we put it in oak, and then we can see what changes between the newly distilled spirit and the spirit that has been aged in barrels for some period of time,” Collins explains. “That helps us to understand what the things are that come from the barrels, versus the things that come from the distillate itself.”

Collins and his team have yet to embark on the next step of their experiments–relating the differences in chemical makeup to potential sensory differences in aroma and flavor–but he feels fairly confident that the two are related. “I think–being a chemist–that the sensory differences arise from the chemistry,” Collins admits. Take, for example, the chemical compounds that arise when the spirit is being aged in a charred barrel. “The sensory component that you smell, that you associated with toasted oak, or charred oak, is going to be related to the compounds that are extracted by the whiskey from the wood,” Collins explains.

Understanding the delicate interplay between chemistry and aroma could be a huge help to distillers looking to tweak their whiskey to encapsulate that perfect blend of smoky and spicy. “This could be a tool could use to understand if they make a change to their distillation processes, how does that impact the resulting whiskey,” Collins said, noting that the better distillers understand how the process of distillation impacts the final product, the better they can manipulate the process to their advantage. “It’s a tool that can be used by distillers large and small to understand the impact of what they’re doing on the chemistry, and then the sensory.”

It’s research that means that the perfect whiskey–smoky, spicy, or however you want it–might not be so elusive after all.