They are utterly different from all other animals, with a central brain that surrounds the esophagus and two-thirds of their neurons in their arms. They’re separated from humans by more than 500 million years of evolution.

Gül Dölen, Ph.D., is an assistant professor of neuroscience at Johns Hopkins University and the co-author of the new Current Biologypaper. She tells Inverse that when octopuses are on MDMA, it’s like watching “an eight-armed hug.”

Despite the differences between octopuses and humans, Dölen and her colleague Eric Edsinger, Ph.D., a research fellow at the University of Chicago’s Marine Biological Laboratory, choose to focus on a single crucial similarity. The brain of the California two-spot octopus contains a serotonin transporter that enables the binding of MDMA — much like human brains.

“We performed phylogenetic tree mapping and found that, even though their whole serotonin transporter gene is only 50 to 60 percent similar to humans, the gene was still conserved,” Dölen tells Inverse. “That told us that MDMA would have a place to go in the octopus brain and suggested it could encode sociality as it does in a human brain.”