LOS ANGELES (CBS) — A cure for baldness may have been accidentally discovered by scientists studying mice and stress at UCLA.

In a study between UCLA and the Veterans Association, researchers were looking at the connection between stress and the digestive system with a new medication when they discovered the drug had beneficial side effects that treated baldness.

The scientists were conducting research on lab mice that had been genetically altered to develop head-to-tail baldness as the result of an overproducing stress hormone. Using a new medication, the researchers treated the mice for five days. When they returned to the experiment three months later, “we saw the mice and all the mice had full heads of hair,” researcher Dr. Million Mulugeta said.

Scientists say they were able to get the hair to grow back in the lab mice 90% of the time with the drug.

In another experiment, Dr. Mulugeta and his team also treated non-genetically altered young mice with the drug before balding. The study found that their hair never fell out.

“[It] prevents the hair loss as a preventive treatment as much as a curative treatment,” said researcher Dr. Yvette Tache.

The study also found that aside from preventing and curing hair loss, the drug had an affect on the mice’s skin pigment. Dr. Mulugeta suggests that the drug could have an affect on the color of hair, including gray.

The scientists say they are still in the early stages of their work and that it may take another five years of research before the drug is available for humans.