The face is one of the most dynamic tools we have to successfully live and interact with other humans. We are evolutionarily designed to pay attention to other people’s face, scanning their mug discern what their social class is, if they’re healthy, if they’re friend or foe, and much more. There’s a reason we can pick out a friend in a crowd through their face instead of their arm. But what determines the wide variability between faces hasn’t been exactly known.

According to a paper published Thursday in the Proceedings of the National Academy of Sciences it comes down to single gene variants that have large effects on facial features. Researchers at the Universities of Oxford and Surrey identified three genes that most powerfully influence how a face looks: The gene PCDH15, which is most often associated with a straight nose; MBTPS1, which regulates steroid biosynthesis; and TMEM163, which affects whether a person develops facial dysmorphia.

The discovery of these gene variants possibly paves the way towards a clearer understanding of the molecular mechanisms influence genes and their ability to shape the face.

“Facial features, such as the shape of the nose, a receding chin or the ‘Hapsburg lip,’ are often passed on in families from generation to generation,” senior author Sir Walter Bodmer, Ph.D., said in a statement sent to Inverse. “Our success in being able to do this [identify specific genetic variants], which has not been done before, has depended on using complicated statistical procedures to analyze facial images of human volunteers.”

Profiles of people of Asian, East-Asian, and European descent were analyzed.

Scientists already have a comprehensive view of what genes determine what sort of facial features. They just didn’t know to what extent those genes augur more significant changes in the face. To figure that out, the research team analyzed 3D camera images of identical and non-identical twins (an extremely useful proxy for gene studies, since identical twins are genetic replicas of one-another), using facial data collected from 1,832 volunteers from the People of British Isles project and 1,567 participants from the Twins UK cohort study (as well as the faces of 33 volunteers of East Asian descent).

The researchers already had the genetic profiles of most participants, so they really only needed to observe what facial features were most variable between people, and work backwards to determine what genes that features corresponded to. The 3D camera picked up 30,000 surface points on the participant’s faces and the researchers pinpointed fourteen “landmark” points, such as the tip of the nose. After the researchers overlayed all the images on top one each other to align the landmark points, they had a very clear view of what parts of faces were most distinct from one another — and by extension, which genes were most responsible for shaping one’s face.

3-D images were scanned and analyzed for landmark features.

After a ton of analysis, the team found that genes controlling the the shape of the nose, steroid biosynthesis, and facial dysmorphia the most important factors in influencing the overall look of a human face.

“This level of genetic variability has probably arisen through natural selection, for example, for the recognition of membership of a group or as a consequence of differential mate selection with respect to facial features,” the researchers write. “Face to face, that is how we recognize each other, and we can do that because the human face is so hugely variable.”