A meal prepared by a chimpanzee may not necessarily appeal to everyone, but the apes, which are the closest living relatives of humans, possess the intellectual abilities required for cooking, a new study says. Scientists believe that the latest findings could help better understand human ecology and evolution.

The study, published in the journal Proceedings of the Royal Society B on Wednesday, found that chimps prefer the taste of cooked food, can understand the transformation of raw food products into a meal, and even save uncooked vegetables for the purpose of cooking later. The discovery suggests that early humans might have developed their cooking abilities earlier than previously thought.

“It is an important question when cooking emerged in human evolution,” Felix Warneken, a psychologist at Harvard University and the study’s co-author, said in a statement. “We thought one way to get at this question is to investigate whether chimpanzees, in principle, have the critical cognitive capacities for cooking. If our closest evolutionary relative possesses these skills, it suggests that once early humans were able to use and control fire they could also use it for cooking.”

Various animals have previously showed a preference for cooked vegetables and meat. But the cognitive capacity required for cooking food was thought to be limited to humans.

“What’s particularly interesting about cooking is it’s something we all do, but it involves a number of capacities that, even without the context of cooking, are thought to be uniquely human,” Alexandra Rosati, a postdoctoral fellow in the psychology department at Yale University and a co-author, said in the statement.

To test their theory, the scientists carried out a series of experiments using wild-born chimpanzees at the Jane Goodall Institute’s Tchimpounga Chimpanzee Sanctuary in the Republic of Congo. The first test replicated the results of earlier studies, showing that the chimps were willing to wait until a raw potato is cooked before eating it.

In subsequent tests, the chimps were presented with a “cooking device” that turned raw potato slices into cooked ones, and another device that left the vegetable unchanged. During the test, the chimps saw the raw potato go into both devices and had to choose one device before seeing its contents. Scientists said that nearly every chimp picked the cooking device, suggesting that they could understand the transformation of uncooked food to cooked food. Scientists also said that a number of chimps, when given a raw piece of potato, wanted to cook it by placing it on the “cooking device.”

“The first time one of the chimps did this, I was just amazed,” Rosati said. “When one of them did it, we thought maybe this one chimp is just a genius, but eventually about half of them did it.”

In addition, about half the chimps chose to save raw potato when they knew they would be presented with the option of cooking it later.

“Delayed gratification is a problem for us as well,” the Guardian quoted Warneken as saying. “We also have a tendency to nibble at food before we’ve finished cooking. Usually chimpanzees just eat what they can get right away and would never give up edible food, so it was remarkable to see that.”

See videos of the experiment here.