We’ve become pretty good at treating certain types of cancer—particularly in kids. Eighty percent of children under 18 are now beating their various malignancies for at least the first five years, compared with less than 10 percent in the 1950s.

But female survivors often face a common problem when they grow up: Their harsh cancer treatments have left their ovaries barren. So reproductive biologist Monica Laronda and biomedical engineer Alexandra Rutz of Northwestern University set out to build them new ones. They designed a 3D-printed prosthetic ovary that can grow healthy eggs. Their secret is scaffolding, which is made of 3D-printed gelatin, and holds ovarian follicles that secrete hormones and contain the structures that develop into eggs.

The ovary needs to be rigid enough to be transplanted, and roomy enough in which eggs can mature. Researchers tested the device by replacing the 1.5-millimeter-wide ovaries of a few dozen mice with the prosthetics. At the Endocrine Society meeting in April, Laronda announced that some of those mice later gave birth to healthy offspring.

Of course, human eggs grow larger and take longer to mature, so scaling up to piglets is the next step. And researchers have already begun preserving and studying ovarian tissue samples from pediatric cancer patients. Children being treated today could have new hope when the time comes to make children of their own.

This article was originally published in the July/August 2016 issue of Popular Science. Check out other insane ideas that just might save the world.