Studies on vitamin D and how it can affect our health have been on a roller coaster ride lately. Some say high levels of the sunshine vitamin can, among many other claims, lower cancer risk, lead to longer life, make colds and the flu disappear faster, reduce respiratory infections, and banish headaches. But recent studies say that people are getting tested too much for the nutrient, and these benefits haven't yet been proven.

Even though no one is quite sure yet if vitamin D can help combat so many conditions, scientists at Johns Hopkins University just released a study of the survey responses and records of over 10,000 Americans spanning almost 20 years. They looked at the way vitamin D levels and exercise amounts affect heart health, and found that there seems to be a direct relationship between the exercise and vitamin D that supersedes the health benefits of either factor by itself.

The first part of the analysis showed that the more the subjects exercised, the more vitamin D was in their blood. The second portion found that the most active people—who also had the highest vitamin D amounts—ended up with the lowest risk of developing heart disease in the future.

“In our study, both failure to meet the recommended physical activity levels and having vitamin D deficiency were very common,” said study co-author Erin Michos, M.D., M.H.S., associate director of preventive cardiology and associate professor of medicine at the Ciccarone Center for the Prevention of Heart Disease at the Johns Hopkins University School of Medicine. “The bottom line is we need to encourage people to move more in the name of heart health.”

She also noted that there’s no need to have vitamin D levels in your blood over 20 nanograms per milliliter. The best way to up your level isn’t by taking a supplement—just get plenty of sun (a few minutes a day not in winter), eat a healthy diet with plenty of whole foods, keep exercising, and keep your weight within range for your height.