A study of twins suggests that genetics plays a major role in whether a person taking opioids is at increased risk of addiction, or will suffer unpleasant side effects from the drugs.

Researchers at the Stanford University School of Medicine studied 121 pairs of twins, as well as non-related people. All of the study participants were given the short-acting opioid alfentanil, which is prescribed by anesthesiologists. Identical twins were more similar in their responses to the drug than fraternal twins, which suggests that genetics play a major role, HealthDay reports.

Genetics accounted for 36 percent of drug disliking and 26 percent of drug liking, which are measures of addiction risk, the researchers reported in the journal Anesthesiology. The researchers found genetics accounted for 59 percent of nausea, 38 percent of itchiness, 32 percent of dizziness and 30 percent of slowed breathing.

“The study is a significant step forward in efforts to understand the basis of individual variability in response to opioids, and to eventually personalize opioid treatment plans for patients,” study author Dr. Martin Angst said in a news release. “We rely heavily on narcotics as the cornerstone medication for the relief of pain,” he added. “Yet we don’t know the answers to fundamental questions, such as why some people ‘like’ narcotics more than others — drug liking and disliking could be key in determining addiction potential.”