It’s possible that one day millions of people with diabetes might not need a lifetime of insulin injections. There’s a ray of hope: According to findings from a new study published in the journal Cell and reported by The Washington Post, scientists at Harvard’s Stem Cell Institute say they can now grow billions of insulin-secreting cells using human stem cells.

Researchers said recent tests showed these cells had the amazing ability to read the amount of sugar in the blood and secrete the perfect amount of the hormone insulin the body requires to regulate blood sugar levels.

The procedure worked so well in preliminary trials on mice that scientists say the cells could potentially be given to a patient with a single transplant. One researcher likened the treatment to creating a new “mini-organ” in the body. For those born with type 1 diabetes—characterized by a lack of insulin-producing cells in the pancreas—the method would revolutionize treatment.

“It would be a functional cure for a patient,” Jose Olberholzer, MD, a professor of bioengineering at the University of Illinois whose research is focused on diabetes, told the Post. “The underlying disease would still be present, but the fact that these insulin-producing cells are there would mean that they would effectively have normal lives.”

But the stem cell treatment still has a long way to go before it can be tested on human patients. One major hurdle is the question of how to keep the body from rejecting these new, transplanted cells.

Did you know that diabetes is actually way more complicated than just “type 1” and “type 2”? Click here for more information.