Leading a healthy lifestyle could help lessen the negative effects of stress on your heart, according to a new study.

The research, published in the Canadian Medical Association Journal, shows that people who lead healthy lifestyles — they didn’t smoke, exercised regularly, were not obese, etc. — had lower risks of heart disease even if they experienced job stress, compared with people who lead unhealthy lifestyles.

The study was conducted by researchers at the University College London, in addition to other institutions throughout Europe, and included data from 102,128 people from seven past studies who were examined between 1985 and 2000. The study participants were between ages 17 and 70, with an average age of 44, and were all from Europe. None of them had any heart disease when they enrolled in the study. The study participants were asked about healthy lifestyle factors, as well as work stress. Sixteen percent of the study participants said that they experienced work-related stress.

Researchers found that people with unhealthy lifestyles had a higher risk of developing coronary artery disease over a 10-year period, compared with people who lead healthy lifestyles, even when both groups reported experiencing work stress.

These findings are particularly relevant given a recent survey showed just how pervasive job stress is — eight out of 10 Americans are stressed by at least one aspect of their work.