Sure, having graying hair in high school is enough material for some good-natured ribbing from your bros—but it’s nothing compared to the social horror that is premature balding, especially in the cruel time that is late adolescence.

Luckily, graying and thinning hair are relatively rare that early, but going gray and bald are major signifiers of aging as you navigate mid-life—and they can often seem to cramp your dating style.

But there’s good news on the hair-loss front, gents: Researchers may have discovered which cells in your scalp are directly responsible for hair loss and gray hair, according to a new study published in the journal Genes & Development. Scientists stumbled upon the cells while studying how nerve-tumors form.

In the study, the researchers showed that a protein tied to nerve development activates skin cells that turn into the hair shaft, and then those hair precursor cells make another protein that is needed for hair pigmentation. The researchers then tested their theory in mice. When the researchers deleted the gene responsible for that pigmentation protein, the mice’s hair turned white. And when the researchers deleted the gene linked with the hair precursor cells, the mice became bald.

“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,” said study co-author Lu Le, associate professor of dermatology with the Harold C. Simmons Comprehensive Cancer Center at UT Southwestern in Texas.

Next up: Studies on humans to see if the pigmentation and baldness genes show up in people as they get older and their hair thins and gets gray. In the meantime, if you’re going gray, we say: embrace it. More and more dudes are rocking salt-and-pepper beards and hair, and looking good while doing it. If you’re going bald, there’s only one option once it gets too far along—shave it. (Hey: It works for The Rock.)