Rufous treepies, birds in the crow family native to South and Southeast Asia, usually eat insects, seeds or fruits. But some of them have learned to eat fire.

Well, not exactly, but close. At a small temple in the Indian state of Gujarat, the caretakers regularly set out small votive candles made with clarified butter. The birds flit down to steal the candles, extinguish the butter-soaked wicks with a quick shake of their heads and then gulp them down.

This willingness to experiment with new foods and ways of foraging is an indicator of behavioral flexibility, and some scientists think it is evidence that certain species of birds might be less vulnerable to extinction.

“The idea is that if a species has individuals that are capable of these novel behaviors, they’ll respond with changes in their behavior more easily than individuals from species that do not tend to produce novel behaviors like that,” said Louis Lefebvre, a professor at McGill University in Montreal and an author on the study. “The idea is pretty simple. The problem was to be able to test it in a convincing way.”