The impact of chocolate on headaches has been a controversial topic in field of headache research. While studies on the effects of cocoa, a prominent ingredient in chocolate, have previously condemned it as a trigger for headaches, new research suggests that it may actually work to prevent headaches rather than cause them.

The latest study on cocoa, presented last month at the International Headache Society’s 14th International Headache Congress, has caused some headache sufferers to look differently at chocolate. “Our data is the first evidence to support that diets enriched in cocoa increase proteins that prevent your nerve cells from becoming excited and releasing inflammatory molecules that are thought to be involved in migraine pathology,” said study author Paul Durham, PhD of Missouri State University’s Center for Biomedical & Life Sciences.

Theobroma cacao—the botanical name for cocoa—has already been shown to improve hypertension and glucose metabolism. However, Durham and his associates’ latest findings indicate that consuming a diet enriched with 10% cocoa also increases levels of anti-inflammatory compounds in the brain and represses levels of pro-inflammatory processes.

Despite the potential positive effects of cocoa, however, don’t be tempted to consider a candy bar as the solution to your next headache. Due to its low cocoa content and the presence of caffeine and tyramine, chocolate is still more likely to increase your chances of a headache than reduce them.