Who knew that rotten eggs could be so useful medically? Scientists have identified a certain compound that is produced when eggs go bad. It’s called hydrogen sulfide, and has been proven to be effective in reversing mitochondrial damage and treating diseases like stroke and dementia.

The study, out of the University of Exeter, found that a new compound known as AP39, could target certain parts of the cell such as the mitochondria, which is known as the “powerhouse” of the cell, when inserted into the body. Mitochondria manage cell growth, cycle, and death, and are also a source of chemical energy. Because it plays a role in a lot of diseases, such as cardiovascular disease, scientists believe that preventing mitochondrial damage could have a therapeutic effect on certain conditions like stroke, heart failure, arthritis, diabetes, dementia, and even aging.

AP39 is able to deliver very small amounts of hydrogen sulfide — which is found both in rotten eggs and human farts — to cells to begin its work. “Although hydrogen sulfide is well known as a pungent, foul-smelling gas in rotten eggs and flatulence, it is naturally produced in the body and could in fact be a healthcare hero with significant implications for future therapies for a variety of diseases,” study author Dr. Mark Wood said in a press release. It’s important to note, however, that hydrogen sulfide in large doses can be deadly.

Scientists have studied the effects of hydrogen sulfide in the past, previously noting that it could play a role in fighting aging. One study, published in 2013, found that the chemical had significant effects on the cardiovascular and nervous systems in the body. Scientists noted that hydrogen sulfide “may become the next potent agent for preventing and ameliorating the symptoms of aging and age-associated diseases.”

With the newest study, in which researchers are targeting mitochondria through AP39, the chemical has been shown to induce survival in 80 percent of mitochondria that are under destructive conditions. “When cells become stressed by disease, they draw in enzymes to generate minute quantities of hydrogen sulfide,” said Professor Matt Whiteman of the University of Exeter Medical School, in the release. “This keeps the mitochondria ticking over and allows cells to live. If this doesn’t happen, the cells die and lose the ability to regulate survival and control inflammation. We have exploited this natural process by making a compound, called AP39, which slowly delivers very small amounts of this gas specifically to the mitochondria. Our results indicate that if stressed cells are treated with AP39, mitochondria are protected and cells stay alive.” The researchers hope to move their experiments forward to be tested in humans next.