Tiny spiders have brains so large that they fill up their body cavities and extend into their legs, a new study reports.

Researchers measured the central nervous systems of nine species of spiders in a range of sizes. While the smallest had smaller brains in absolute terms, relatively speaking their brains were enormous.

“The basic trend was that the smaller the spider, the relatively larger its brain is,” said William Eberhard, a biologist at the Smithsonian Tropical Research Institute in Costa Rica and an author of the study, which appears in the journal Arthropod Structure & Development.