They say dogs are a man’s best friend, and if you’re a dog person then that’s a statement you can probably get behind. How else do you describe a faithful animal that’s always happy to see you, follows you around with doggy kisses, and at the end of the day just wants to be loved?

Well, according to science there may be another reason that some pooches are so social and outgoing around other humans, to the point of sometimes being hypersocial. And it has nothing to do with their penchant for a good ear scratch or a bowlful of kibble.

According to a study published in Science Advances, it could all come down to a simple gene. In looking at overly friendly dogs, researchers found that they carry two variants of genes called GTF2I and GTF2IRD1. Those are the same genes that, when absent in human beings, cause Williams syndrome—a condition in which there’s a surplus of oxytocin, a.k.a. the love hormone. As a result, some humans with Williams syndrome can’t help but love everyone.

Considering that dogs have evolved away from wolves and towards humans over the years, some biologists feel the genes may have a similar effect on our canine friends. “We may have bred a behavioral syndrome into a companion animal,” Princeton evolutionary biologist and study lead Bridgett Von Holdt told National Geographic.

The study notes that while there is an abundance of research directed towards the unique relationship between dogs and humans, the genetics behind the evolution (and how it compares to wolves) remains murky. So to delve a bit deeper with this study, biologists took 18 domestic dogs and 10 captive, human-socialized gray wolves and trained them to open a box with a piece of sausage in it.

The animals were each given three attempts: one in which they were in a room alone, one in which they were in a room with a familiar human, and one in which they were in a room with a stranger. In all three cases the wolves outperformed the dogs, but when humans were present the dogs’ attention span waned considerably: although they all knew how to open the box, they dogs were simply distracted by the humans.

“This finding suggests that there are commonalities in the genetic [makeup] and canine tameness, and that directional selection may have targeted a unique set of linked behavioural genes of large phenotypic effect, allowing for rapid behavioral divergence of dogs and wolves, facilitating coexistence with humans,” notes the study.

Additional research needs to be done to confirm these findings, especially considering the sample size was so small. Still, as University of Pennsylvania’s canine behaviour expert Karen Overall notes, the genetic analysis is an important one for future advancements, and scientists are probably “barking” up the right tree. Especially as we continue to see dogs evolve to current human being needs and desires.

“We’re now selecting for dogs that are easy keepers, that can spend long periods of time in small apartments,” Overall told National Geographic. “We’re actively changing dog behaviour every single year.”