Humans—and the rest of earth’s four-legged land-dwellers—have their fish ancestors to thank for their hands and feet. We’ve long known that limbs evolved from the fins of ancient fish, but the details of their shared history have proven difficult for scientists to pin down. Now, a new study published in Nature suggests the structures share more in common than we once believed.

A quick glance shows that fins and fingers share some obvious similarities: They both consist of long, skinny bones fanning out away from the body. But there’s a fundamental difference separating the two structures. The bones in our fingers are endochondral bones, or bones that form around a base of cartilage (think arms, legs, and most bones in our body). Fish fins are made of dermal bones, which form directly on the innermost layer of skin like the top of a human skull.

This distinction led researchers to suspect that the limbs of early tetrapods (four-legged vertebrates) were a structural innovation, resulting in the gradual loss of fins in the animals. Looking to delve further into this mystery, a team of researchers began experimenting with the hox genes of zebrafish.

Hox genes are responsible for laying out the basic body structures of animals. We’ve seen how the genes map out the limbs of tetrapods, but little research has been done on how they function in fish fins. For example, studies have shown that when the genes hoxa13 and hoxd13 are mutated in mice they don’t develop wrists or fingers. When researchers mutated these same genes in zebrafish, they found that their fin bones didn’t grow to be as long and they had extra endochondral-bone structures.

The results provide a strong case for the evolutionary connection between fins and fingers. Earlier in 2016, a different study traced the origin of limbs and fins back even further to the branchial rays of gills in ancient cartilaginous fish. As was the case with that study, just because some genes function similarly in mice and fish doesn’t mean they didn't evolve independently. What it does show is that the two structures are more similar than we gave them credit for, despite some major differences.