Back in the late 1980s, bone grafts were fairly traumatic. To repair fractures or amend bone loss, at least two surgeries were required to transplant bone from one part of the body to another. But while scuba diving in the South Pacific, a Pennsylvania State University professor had an idea for how eliminate one of those surgeries and avoid the dangers of an extra procedure.

The professor, Eugene White, looked past the fantastic, vivid colors of the marine life surrounding him and to the structure supporting this abundance. He realized that coral’s porous structure—which channels nutrients and aids communication throughout the colony—resembles the spongy structure of bones. Coral, he thought, would make great bone grafts.

But White and his nephew Rodney, a medical student at the time, soon realized that the coral wasn’t perfect. Bone grafts knit together with existing bone and eventually dissolve away; some of the coral grafts failed to biodegrade and instead left behind enough coral bits for bacteria to grow, reports Meaghan Agnew for Modern Farmer.

Recently, though, researchers from Swansea University in Wales figured out how to convert the some of the coral’s calcium carbonate to a more bone-like material called coralline hydroxyapatite/calcium carbonate, according to BBC.com. This solved the biodegrading problem.

Now all the pieces are in place for coral farming, writesAgnew:

OkCoral, an Israeli company founded by Assaf Shaham, farms corals specifically for bone grafting (his carbonate extractions go for a cool $250 a vial). CoreBone, another company based in Israel, is growing coral on a special bioactive mineral diet to make it especially suitable to grafting.

Perhaps this growing demand for coral to help humans could persuade more to care about the looming extinction of reefs. Bone grafts aren’t the only medicine that can come from coral. Reefs are the rainforests of the sea; they’ve already provided treatments for asthma and cancer and many more compounds could yet be discovered.