Research shows the genes of people with a deep sense of purpose in life are better equipped to fight disease and infection.

For many people, happiness can be an elusive thing. Some try to achieve it by filling their lives with professional success and expensive toys, while others find it by living a purposeful and altruistic life.

A new study has found that true happiness—the kind rooted in virtue—can positively affect a person right down to his or her DNA. It may even prevent disease.

Experts call this type of happiness eudaimonic well-being. The other kind, based on superficial value and self-gratification, is called hedonic well-being.

Researchers from the University of California, Los Angeles (UCLA) say the genes of people with high levels of eudaimonic happiness function better by keeping inflammatory gene expression low and antiviral and antibody expression high.

In essence, eudaimonic well-being keeps inflammation—which is linked to numerous ills in the body, including heart disease—at bay while still fighting off infection and disease.

That’s perhaps one reason Mother Theresa lived to 87, despite being around the sick and dying for so many years.

To determine how happiness affects health, researchers tested the blood of 80 healthy adults. All were screened for both hedonic and eudaimonic happiness, as well as negative psychological and behavioral traits.

While the hedonic and eudaimonic groups reported the same levels of positive emotion, their genes told a different story, according to the study, published in Proceedings of the National Academy of Sciences.

“What this study tells us is that doing good and feeling good have very different effects on the human genome, even though they generate similar levels of positive emotion,” senior author Steven Cole, a UCLA professor of medicine, said in a press release. “Apparently, the human genome is much more sensitive to different ways of achieving happiness than are conscious minds.”

Researchers say humans likely evolved this capability in order to fight changing threats, and carried it into contemporary society to respond to social or symbolic threats.

So there’s a chance that performing random acts of kindness may help keep you healthy. At the very least, it can’t hurt.

No matter how much someone “likes” something on Facebook, it doesn’t improve his or her well-being. In fact, it harms it.

New research published in the journal PLOS One shows that the more young adults use Facebook and other social media, the more their overall happiness declines. Specifically, increased social media use affects people in two ways: how they feel in the moment and how satisfied they are with their lives overall.

“On the surface, Facebook provides an invaluable resource for fulfilling the basic human need for social connection,” University of Michigan social psychologist Ethan Kross, lead study author, said in a press release. “But rather than enhance well-being, we found that Facebook use predicts the opposite result—it undermines it.”

Maybe it’s best if your acts of kindness involve face-to-face interaction.