So, I have what might be an unpopular opinion: there are cute dogs, and then there are pugs. With their squished little faces, buggy eyes, and snuffling breaths — there’s not much about pugs to recommend them (and I like dogs). But now, at least, scientists have a better idea about the genetics that make these little canines look like they ran face-first into a wall.

The category of squish-faced dogs, more correctly called brachycephalic dogs, also includes bulldogs, Boston Terriers, Shih Tzus, Pomeranians, and other breeds. Centuries of breeding have shortened their heads from front to back, and widened the roof of their mouths. The shape of their faces can make it hard for these dogs to breathe, and their bugged-out eyes are easily injured. A group of scientists and veterinarians wanted to find the genes responsible for these dogs’ flat faces. They published their investigation this week in the journal Current Biology.

With the owners’ permission, the researchers took CT scans of 374 pet dogs that had been referred to their veterinary clinic. Using these scans, the researchers created 3D reconstructions of their faces so they could map and measure the dogs’ features. They found, unsurprisingly, that the extent of facial squishedness — when they controlled for dog size — tended to group with dog breed. On one end of the spectrum were the extremely snouty dogs, like smooth collies. On the other end of the spectrum: pugs.

The researchers also discovered genetic variations that tracked with the dogs’ face length. Several were especially common among the squish-faced dogs — including one mutation that suppresses a gene called SMOC2. The gene encodes a protein that helps cells stick to things, multiply, and rebuild tissue — in fish, it’s known to be important for normal facial development. The same appears to be true in dogs, the study reports. The more this mutation was able to suppress SMOC2, the flatter the dogs’ faces.

There are probably other genes involved, as well — the SMOC2 mutation accounted for only a little more than a third of the differences in face length that the researchers observed. The real proof would be to cut SMOC2 out of the DNA that normal-faced dogs pass onto their offspring, and see what percentage of their pups grow up to look like pugs. But, why would you want to make a perfectly cute doggo look like that?