The line between love and hate is a thin one, and a new study shows that nowhere is this truer than in the brain itself. In the Journal of Cognitive Neuroscience, researchers from the University of Illinois at Urbana-Champaign published findings of a signal in the brain that shows the so-called “cooties” effect. As anyone who’s ever been a child knows, young kids have an aversion to others that turns into interest with the onset of puberty.

Turns out, these reactions are actually encoded in a part of our brains called the amygdala. This bundle of neurons is where we process memory, decisions (often related to survival), and emotions like fear and pleasure. Scientists once thought the amygdala was a site for assessing potential threats, but that might have just missed the truth. According to Eva Telzer, who led the study, it’s more like a “significance detector.”

Researchers evaluated the attitudes of 93 children toward same-sex and opposite-sex peers and looked at brain activity in 52 children using an MRI. The amygdala responds more to opposite-sex faces in young children (ages 4 to 7) and teenagers (12 to 17), and less in prepubescent-aged children (10 to 12), whose response to both genders is about the same. Only the youngest in the study “demonstrated a behavioral sex bias such that they rated same-sex peers as having more positive (and less negative) attributes than opposite-sex peers,” researchers wrote.

In other words, the brain lights up in the same area in the same way when we girls are repulsed by boys on the playground in elementary school and when we want them to ask us out in high school. The crush/cootie continuum is simply hardwired, along with the impulse to both fear and feel attracted to the opposite sex.