It’s not easy turning embryonic stem cells into sperm cells in the lab, but a team of Chinese scientists managed to grow viable specimens using samples from mice. To prove their method works, they fertilized eggs with their dish-grown sperm cells, which successfully produced baby mice. Even better, those babies eventually made babies of their own. At least one previous study produced offspring, but the resulting mice had developmental issues that prevented them from reproducing.

Embryonic stem cells, as you might know, can differentiate into any type of cell and are widely used in medical research. In order to coax them to transform into sperm cells, though, the team had to create an environment that mimicked the inside of a mouse’s testes. They mixed the stem cells with chemicals, testicular cells and hormones that gave rise to what the scientists call “spermatid-like cells.” While they have the same genetic material as real sperm, spermatid-like cells don’t have tails. That’s why they were manually injected into the eggs that were implanted into surrogate mothers.

The researchers (who hail from the Chinese Academy of Sciences in Beijing and Nanjing Medical University in China) are hoping that their study can solve infertility in men. They plan to perform further tests and replicate their results using other animals, including non-human primates, in the coming years to achieve that goal. If you’d like to read about the study’s technical details, check out the group’s paper published on Cell Stem Cell.