When did you figure out if your child was right or left-handed? It takes months for babies to even start holding things, but according to a new study, scientists can tell which hand a child will write with before they are even born. This early detection of hand preference could have some major implications for the early detection of certain health issues.

Italian researchers analyzed the movements of 29 fetuses between 14 and 22 weeks of gestation using ultrasound technology. They found hand preference was well defined at 18 weeks.

How do you tell which tiny hand on an ultrasound is the dominant one?

It turns out the dominant hand is the one that moves faster during precise movements, according to the scientists. They looked at how the hands moved when reaching for the mouth or the eyes. Then, as a control, they measured how they moved when just reaching for the uterine wall, a move that doesn’t need to be so specific.

At just 18 weeks, it seems, the babies were already making certain hand movements that require precision (such as reaching for their eyes and mouth) more quickly with their dominant hand. (A control movement that didn't require the same fine-motor skill didn't show as much of a difference in speed.)

Nine years later, the researchers caught up with the kids and found they’d predicted the children’s dominant hand preferences—with accuracy ranging from 89 to 100% .

“Our method for reliably assessing handedness prenatally may help to catch ‘early’ neurological problems and to counteract child development disparity signaled by handedness,” the researchers wrote.

According to the scientists, previous research has suggested that dominant hand preference is linked to certain issues associated with cerebral asymmetry, such as depression, schizophrenia and autism spectrum disorders.

“Left-handed are reported to more likely suffer from depressive symptoms and individuals diagnosed with autism spectrum disorder are significantly more left-handed than right-handed,” they note. (On the other hand—?—a disproportionate number of presidents and other world leaders are left-handed.)

Now, researchers can build upon the Italian study to figure out what else we can learn about our babies’ future selves from the movements they make as infants and even as fetuses.