The type of man who makes a woman’s heart flutter has a lot to do with whether she was a daddy’s girl, according to a new study.

Women who got along well with their dads as kids are attracted to men who resemble their fathers, whereas women who had a bad father-daughter relationship do not.

Lynda Boothroyd, a psychologist at Durham University in England, and her colleagues at the University of Wroclaw and the Institute of Anthropology in Poland asked a trained anthropologist to perform facial measurements on the photographs of 15 random men as well as the photographs of the fathers of 49 Polish women participating in the study.

The anthropologist calculated 15 key proportions based on how various features—such as the lips, nose, cheekbones and brows—related to each face’s height and width. The researchers also compared the 15 random faces to each of the father’s faces to determine how closely they resembled one another.

The women then rated their childhood relationships with their fathers based on how emotionally invested they felt their dads had been in raising them and how much time their fathers had spent with them. The women were split into two groups based on how positively or negatively they rated their relationships.

Then the researchers asked the women to rate how attractive they found each of the 15 random male faces.

The women who had reported positive relationships with their fathers were much more likely to be attracted to men resembling their fathers, the researchers found. On the other hand, women with bad dad relationships did not find men who looked like their fathers appealing.

“While previous research has suggested this to be the case, these controlled results show for certain that the quality of a daughter’s relationship with her father has an impact on whom she finds attractive,” Boothroyd said in a prepared statement. “It shows our human brains don't simply build prototypes of the ideal face based on those we see around us, rather they build them based on those to whom we have a strongly positive relationship.”

Although no one yet knows for sure why females show these preferences, a woman with a great dad may choose a similar-looking mate in the hopes that he will also be a good father, the researchers wrote.