Eating chocolate could actually prevent and even treat diabetes, according to a Brigham University study. The study revealed that there were compounds in cocoa which actually help the human body release more insulin. Resultantly, the body is in a better condition to battle diabetes. The one rider is that cocoa doesn’t necessarily mean sugar.

One should consume cocoa, the study says, but with without too much sugar in it. Diabetes is caused by the body’s inability to produce enough insulin or failure to process blood sugar in the required manner. Beta cells whose job is to produce insulin, fail to do so. Compounds in cocoa help beta cells work more efficiently and strengthen them, according to the study. Animals, which were on a high-fat diet, were fed the cocoa compound by collaborators at Virginia Tech, who saw that the compound had a two-pronged effect—it brought down their obesity levels and helped them fight higher blood glucose levels.

What this means is that these compounds can be packed into foods or supplements in a refined and balanced way to control diabetes. The compound could even be isolated to treat diabetes, researchers say. The American Diabetes Association and Diabetes Action Research and Education Foundation contributed to funding the study.