More than 30 years ago a team of scientists painstakingly traced the connections among each of the 302 nerve cells in the hermaphrodite Caenorhabditis elegans worm. But it took until now for someone to get around to doing the same for the male.

A new map, published in Nature, represents the first such complete wiring diagram for both sexes of an animal. The so-called connectome shows which neurons are linked to others, along with the muscles and other functions they control, and how strong those connections are. The wiring plan enables researchers to better understand how these creatures sense and react to their environment.

“It provides a level of completeness in terms of understanding the entire structure of an animal nervous system at an unprecedented level,” says Douglas Portman, an associate professor at the University of Rochester, who was not involved in the study but wrote a commentary that ran alongside it.

This is a 2.0 connectome compared with the earlier version, Portman says, and provides an essential foundation for understanding more complex nervous systems such as our own.

Scott Emmons, the paper’s senior author, says some of the newly mapped circuits have direct implications for human behavior. Many of the genes involved in human conditions such as schizophrenia and autism are the same ones that determine neuronal connections in worms, he says. “Anything we can learn about how these function is going to help you guess what it may be doing in the human brain,” he says.

The earlier connectome, published in 1986, examined each synapse—the junction between nerve cells. The new map includes a physical location of each connection and a measure of the strength of a given network link, looking, as Portman wrote in his commentary, “like the cobwebs that lurk at the back of the broom cupboard.”

The new work, which reexamined the wiring diagram of the hermaphrodite also found significant differences between the sexes, including in behavioral circuits that are not directly related to reproduction. C. elegans “females” are hermaphrodites, capable of producing enough sperm to generate 300 offspring on their own, says Emmons, a professor of genetics and neuroscience at the Albert Einstein College of Medicine in New York. But they also reproduce with males of the species—in which they take on the role of females. For males to pass on their genetic code, they need some additional hardwiring to find and inseminate a mate. It’s not yet clear, Emmons says, why there are so many sex differences in the connections, apparently extending beyond reproductive functions.

The hermaphrodite has 302 neurons, which connect to 132 muscles and 26 other spots, such as the gut, gonads and skin. In contrast, the male C. elegans has 385 neurons, connecting to 155 muscles and 39 other locations, the study found.

The earlier researchers had examined the hermaphrodite, but the work was so arduous that the lab hadn’t moved on to the male, though it had imaged both sexes. In 1999, Emmons decided it would be useful to have the wiring diagram of both sexes, but it wasn’t until 2012 that he published a close examination of the male tail, the area that most differs from the female. In the new paper, Emmons and his colleagues completed the diagram of the entire male and redid the female version to make sure the maps were comparable.

Although the new effort isn’t perfect, and information on the significance of particular connections is still missing, it was still worth the effort, says Olaf Sporns, a professor in the Department of Psychological and Brain Sciences at Indiana University, who was not involved in the work. To understand how a nervous system works requires figuring out how the elements of that system are connected, he says, “it really isn’t possible any other way.” He notes: “It’s really hard for me to imagine having a complete account of how brain and behavior interact with each other without this fundamental data set that’s now been provided for for C. elegans.”

Although technology has obviously advanced since the earlier research, the work still can’t be automated. Each bend and bump on every neuron had to be recorded by someone clicking a mouse. The software then draws maps of each neuron and its connections, making that part of the task much easier, Emmons says.

But perhaps the biggest message of this endeavor is how complicated a modest connectome can be. “The worm may be simple at the level of the number of cells by comparison to other animals, but it is not simple in its behavior,” Emmons says. “It has learning, it has memory, it has fear, it can learn the presence of predators and run away from them, it can navigate toward food, it can find the opposite sex and once it encounters it, it knows how to mate with it.”

That complexity is humbling, says Paul Sternberg, a biology professor at the California Institute of Technology in Pasadena, a former Emmons postdoc, who reviewed the paper, but was not involved in writing it. “It’s going to be a long, long time if ever that we’re going to have that information about ourselves,” he says. Yet even if it takes another 50-plus years, it will be worthwhile to try to map the human connectome, he says. The connectome will never answer all of our questions about how our brain works, but it is part of that answer, Sternberg says.

“If a worm can do so much with so few neurons, and we have orders of magnitude more neurons,” Sternberg says, “then we’re amazing.”