It’s not the most glamorous scientific question ever asked, but when did insects evolve? An international research team revealed the answer on Thursday. They traced the insects family tree back more than 400 million years ago.

More than 1,400 genes from 144 species spanning all the major insect groups were studied. All of this to figure out how the world’s largest animal group evolved. “Two thirds of all known animal species are insects,” said Bernhard Misof, one of the study leaders of the study published in Science. “They are the most important players in terrestrial ecosystems, together with plants.”

So, when did the first insect appear? The researchers place that date around 480 million years ago, around the same time as the first land-based plants. That date is about 70 million years older than the oldest-known insect fossil.

This timeline places insects during the Early Ordovician Period.

Karl Kjer, another team-member who worked on the study, talked about how important insects are to terrestrial life on Earth. “Insects are so dominant that it’s hard to imagine any kind of terrestrial life on Earth that has not been shaped by them,” he said. “I’m trying to think of one…Perhaps penguins? They might not need insects in Antarctica, but I think everything else does,” Kjer said according to AAAS.

What about flying insects? The researchers had an answer for that too. Insect are believed to have evolved for flying about 406 million years ago. That means insects ruled the skies for nearly 200 million years before another animal gained the ability to fly – the pterosaur.

As for the pesky cockroaches and termites we see today? Those came in the wake of the Permian mass extinction, the largest extinction event in Earth’s history 252 million years ago.

There was a first for everything, and insects pretty much hold the records. “Insects did just about everything first,” Kjer said. “They were the first to form social societies, farm, and sing – just about anything you can imagine.”