If you were thinking about giving up chocolate for the New Year, you might want to rethink your resolution. That’s because results from new research, published in the British Journal of Cancer, suggest foods like dark chocolate, which are high in magnesium, can dramatically reduce the risk of developing pancreatic cancer.

The study, led by researchers at Indiana University Bloomington, found that every 100-milligram-per-day decrease in magnesium intake was associated with a 24 percent increase in pancreatic cancer risk. Not only is it the fourth leading cause of cancer-related death in the U.S., but pancreatic cancer is also has the highest mortality rate of all major cancers, according to the Hirshberg Foundation for Pancreatic Cancer Research. About 74 percent of pancreatic cancer patients die within the first year of diagnosis, and only 7 percent of those diagnosed survive more than five years.

“Pancreatic cancer is really unique and different from other cancers,” said study co-author Ka He, chair of the Department of Epidemiology and Biostatistics at the Indiana University Bloomington, in a press release. “The five-year survival rate is really low, so that makes prevention and identifying risk factors or predictors associated with pancreatic cancer very important.”

Although past studies have revealed an inverse relationship between magnesium intake and diabetes, which is also a risk factor for pancreatic cancer, few studies have examined the relationship between the mineral and pancreatic cancer. So, researchers looked at the direct association by looking at data from more than 66,000 men and women between the ages of 50 and 76. During the course of the study, 151 study participants developed pancreatic cancer.

Factors, such as age, body mass index, and anti-inflammatory drug use, did not modify the effect of magnesium intake on a person’s risk of developing pancreatic cancer.

Pancreatic cancer accounts for about 3 percent of all cancers in the U.S. and about 7 percent of cancer deaths, according to the American Cancer Society. Rates of pancreatic cancer have been fairly stable over the last decade, but the mortality rate has increased annually from 2002 to 2011.

“For those at a higher risk of pancreatic cancer, adding a magnesium supplement to their diet may prove beneficial in preventing this disease,” said  Daniel Dibaba, who led the study. Magnesium can also be found in dark, leafy greens and nuts.

Source: Dibaba D, Xun P, Yokota K, White E, He K. Magnesium Intake And Incidence of Pancreatic Cancer: The Vitamins and Lifestyle Study. British Journal Of Cancer . 2014.