You may love chocolate, but you should probably start preparing yourself to say goodbye to it: Scientists at the National Oceanic and Atmospheric Administration have predicted that cacao plants are likely to go extinct as early as 2050 due to climate change. But there’s one glimmer hope on the horizon: Mars—the candy company which makes such chocolate treats as the Snickers and the Twix bar—has teamed up with the University of California on a new method that may help save future cacao crops.
Most of the world’s chocolate comes from West Africa—the plants thrive in the region’s rainforests—but over the next 40 years, the Earth’s rising temperatures will push cacao farms up into the mountains, to areas either unsuitable for cultivation or already reserved as wildlife preserves.
A new effort the University of California Berkeley, however, is using CRISPR technology to modify the DNA of the cacao plants, according to the Independent. Hopefully, the genetically modified plants will be able to survive rising temperatures and farms won’t have to be relocated to higher elevations.
NOAA’s report states that climate change will affect not the current generation of cacao plants, but the next one, meaning that, “there is time for adaptation.” But the outlook still seems dire: NOAA warns that 89.5% of land currently used to cultivate cacao will no longer be suitable by 2050. The agency recommends focusing on farming specific breeds of cacao seeds that are resistant to drought and supporting more efforts to grow cacao seeds using a traditional Brazilian method called cabruca, in which additional trees are planted in the rainforest to provide cacao trees with shade—a critical element the seeds need to survive.
Climate change will clearly have far-reaching consequences for the way people eat, and thankfully scientists are already figuring out ways to adapt to the forthcoming crisis. In the meantime, next time you take a bite of chocolate, you should take the time to savor it.
This story originally appeared on Foodandwine.com.