If you have ever wondered whether your health depends more on nature or nurture — whether it's your genes or how healthy your lifestyle is — that is more important to your overall health and the risk of health problems, behavior issues, disease risk and how quickly you age — a new study may offer an answer.

Your genes may put you at risk for high cholesterol, but if you exercise regularly, you not only will strengthen your body and cardiovascular system, you may actually end up influencing your genes. A new study adds an interesting piece of evidence to the idea that genes — nature — are not destiny. It finds that the environment may play more of a role in how our immune systems age than genes do.

The study highlights just how much environment affects us, right down to the molecular level. So it may not be “bad genes” that trigger disease so much as “bad environments.”

The parts of our genome that change over time or because of environmental triggers like a lack of sleep, stress, disease and diet are known as the epigenome. “They're instructions rendering stretches of DNA — and the genes residing in those stretches — alternatively accessible or off-limits to the massive mobile molecular machines that read our genes. Ultimately, they orchestrate the production of the proteins our genes encode,” explained author, P.J. Utz, in a statement.

Researchers were able to look at epigenetic changes, or marks, in the cellular machinery known as histones that helps “read” DNA and translate its instructions into actions, like making proteins across many types of immune cell, using a technology called mass cytometry. They found that not only did older people’s histones have more marks than young people’s, there was a lot more variability in how much they were marked, compared to young people.

The Stanford University School of Medicine team looked at blood samples from pairs of identical twins in order to understand the degree to which nature played a role in shifting genetic expression. Histone patterns were more similar in the identical DNA of younger than older twins. This suggests that it's the environment that affects the histones over time. In fact, in older twins, the differences in histones were sometimes so great that they looked like they came from people who weren’t related, the researchers reported.

The epigenetic changes seen in the study probably came from factors like stress, diet, what city you live in, infection, exercise and other lifestyle habits, the researchers say. The study highlights just how much environment affects us, right down to the molecular level. So it may not be “bad genes” that trigger disease so much as “bad environments.”

“The immune system plays a prominent role in all kinds of diseases,” said author Purvesh Khatri. “By focusing too heavily on genetics, we're ignoring the implications of human immunology and environmental influences that act on it.”

The results remind us what a large part of health is environmental — we can’t control everything, but we can control a lot. Staying a healthy weight, exercising, eating a plant-based diet, getting enough sleep and taking care of your mental health are all very good ways to keep your genome (or epigenome) in as good shape as possible.

The study is published in the journal Cell.