Following the same path as other life-changing medical achievements, like penicillin and the pacemaker, the cure for gray and thinning hair could be found by a simple mistake. Researchers at the University of Texas Southwestern Medical Center have identified the skin cells behind balding and graying hair in a study that originally attempted to understand more about tumors.

Read: Fitness Video Games May Be Good For Cognitive Performance, Enhanced Memory

The team found that KROX20, a protein that’s important in maintaining a healthy nervous system, is also vital when it comes to graying and balding hair. According to the release, this protein is active in skin cells at the hair shaft and a new protein, called stem cell factor, is produced. In the study, when researchers erased the SCF gene in mice, the critters’ hair turned white. When they removed cells that produced the KROX20 protein, the mice became bald.

“Although this project was started in an effort to understand how certain kinds of tumors form, we ended up learning why hair turns gray and discovering the identity of the cell that directly gives rise to hair,” Dr. Lu Le, Associate Professor of Dermatology at UT Southwestern, says in a release. “With this knowledge, we hope in the future to create a topical compound or to safely deliver the necessary gene to hair follicles to correct these cosmetic problems.”

Le and his group of scientists were originally studying a genetic disease called Neurofibromatosis Type 1. The rare disorder makes tumors grown on nerves.

Using this accidental find, the team will try to determine what happens to the KROX20 protein and SCF gene as we age. Le hopes that further research will help scientists discover potential cures for balding and graying hair.

According to IBISWorld, a provider of market research, the hair loss treatment industry is booming, earning an estimated $3.6 billion in revenue last year, reports Global Cosmetic Industry magazine. While many associate balding with men, women often seek out treatments for thinning hair, too. The magazine says that about 40 percent of American females over the age of 18 have troubles with thinning hair. The problem gets worse with aging, as about half of American women over 58 years old reported hair loss. The problem is often exacerbated by hair dye, which many turn to in order to cover up those persistent gray hairs. However, the Dermatology Times writes many incorrectly assume that the loss is due to less hair being produced, rather than breakage, which is usually the culprit.

Read:Even More Reasons Not To Drink Soda: New Study Says It May Increase Dementia And Stroke Risk

While there isn’t (yet) a cure for hair loss, several studies indicate that certain foods could be good for your locks. Prevention reports that the omega-3 fatty acids and vitamins in salmon are good for hair. A study from 2015 indicated that omega-6 fatty acids and antioxidants, in addition to omega-3s, helped with hair loss as participants experienced more growth and thicker strands. The magazine advises eating foods high in these nutrients like walnut, flaxseed and grapeseed oil.

See Also:

Can Your Diet Prevent Alzheimer's? 2 Healthy Eating Plans To Battle Dementia

Anabolic Steroids After 40 Or 50: Men Turning To The Drug As Anti-Aging Treatment, Long-Term Effects Unknown