When I was a sophomore in college, I had just started dating this guy—let’s call him Alfie—who, after class one day, invited me over to his place for the first time. As we sat on his bed, he turned to look at me with his deep blue eyes and said, “Do you want to see something cool?”

He reached reach under his bed and pulled out a large microscope with a sample of something swabbed beneath its lens. He told me to take a look through the eyepiece—at his sperm. You probably have a lot of questions, right? So did I. Like, where did he get the microscope? And how long had he been storing his DNA under the bed?

Alfie’s DIY science project isn’t actually that uncommon though. When it comes to understanding male infertility, counting sperm under a microscope is how professionals still do it because modern methods are surprisingly imprecise. But with the world’s first baby being born from the DNA of three people and male birth control slowly but surely on its way, we are reaching new heights with reproductive technology. Now, new research at the University of Birmingham, UK is offering a novel way to tackle infertility: by improving the health of a man’s sperm.

Infertility affects one in six couples and male infertility accounts for half of those cases. Sperm abnormalities, including low numbers of rapidly swimming sperm and high numbers of oddly shaped sperm, are a main culprit. Sperm need to be able to swim quickly and efficiently (known as having good “motility”) in order to successfully travel through the woman’s cervix, womb and fallopian tubes to reach their final destination and fertilize the egg. Those with a healthy shape (or good “morphology”) are better candidates because malformed sperm tend to have damaged DNA.

The University of Birmingham’s five-year study is using high-powered cameras to examine both motility and morphology in sperm. Combined with mathematical modeling, this will give us a better idea of what male infertility looks like and, for individuals with fertility issues, the best courses of action to make sperm healthier.

These findings will also help remove much of the current guesswork involved around choosing which sperm should be injected into a partner’s egg in cases of in vitro fertilization (IVF). The researchers hope to cut the infertility rate and make the IVF process, which can be both emotionally intense and costly for couples, a little more bearable.

In the meantime, it doesn’t hurt to take care of yourself and do all of the things your doctor has been telling you to do, like eat well and quit smoking—two things that are already proven to improve sperm’s health. There is no better cure than prevention. Your sperm will thank you for it.

Debra W. Soh is a sex writer and sexual neuroscientist, specializing in the fMRI of paraphilias (or unusual sexual interests) at York University in Toronto. She has written for Harper’s, The Wall Street Journal, The Globe and Mail, New York Magazine and many other outlets. Follow her on Twitter: @debra_soh.