Gummy candies are delicious. But after a while, they harden up. Luckily, scientists at Ozyegin University in Türkiye have been chewing on a way to keep gummy candy squishy for longer.

Gummy candy is made of sugar, starch, gelatin, and water. Changing the ratios of these ingredients results in different textures and shelf-lives. The team focused on sugar, which comes in different forms. They tested fructose (fruit sugar), glucose (simple sugar), and sucrose (table sugar—a combination of fructose and glucose). The team devised a new recipe that uses the perfect ratio of sucrose to glucose to create the right consistency. Thanks to science, leftover gummy Halloween candy may not have to go to waste!