People with a family history of alcoholism are more likely to drink when they feel under stress, a new study suggests.

The study included 58 adults. They were divided into groups based on whether or not they had a family history of alcoholism, according to HealthDay. Both groups solved math problems under time constraints in a public place—considered a stressful situation—and then were allowed to drink. Study participants with at least one parent who had a history of alcoholism drank more than those without a similar family history.

“If alcohol relaxes you when you’re stressed, then you should try to find other ways of calming yourself down — relaxation exercises, for example,” study author Anna Soderpalm Gordh of the University of Gothenburg in Sweden said in a news release.

The study appears in the journal Pharmacology Biochemistry and Behavior.