The drug ketamine has gone through its fair share of rebranding throughout the decades.

Approved by the FDA as an anesthetic in the 1970s, it soon become better known as a recreational club drug and date rape drug, thanks to its ability to cause dissociation and amnesia. In the last few years, however, the pendulum has swung back around, with some doctors claiming that low doses of ketamine seem to help people with otherwise untreatable depression, and in much shorter time than with other antidepressants.

Ketamine’s depression-treating potential has mostly only been shown in small-scale trials and case reports. But a new study published Wednesday in Scientific Reports, using some unconventional data-mining, provides more proof these doctors may actually be onto something.

Researchers pored through data from the FDA’s Adverse Effect Reporting System, or FAERS, which tracks the safety record of drugs after they’ve been released to the public. From 2004 to 2016, they found 41,000 reports involving ketamine, out of 8 million total. Instead of looking at ketamine’s side effects, though, they instead looked for what was missing.

Compared to any other combination of drugs taken for pain, they found that ketamine users were less likely to report symptoms of depression. Ketamine users were similarly less likely to report pain and typical side-effects associated with opioid use, like constipation. And their reverse-search method also dug up three other drugs associated with fewer depression symptoms: the antibiotic minocycline, the non-opioid pain reliever diclofenac, and Botox, the neurotoxin since repurposed as a treatment for muscle spasms, migraines, and facial wrinkles.

“The reduction of depression rates in ketamine patient records makes a case for study of ketamine as a psychiatric drug,” the researchers wrote.

Right now, scientists are still struggling to understand how ketamine might work to relieve depression. Unlike conventional antidepressants, ketamine therapy, which is given through an IV, has been shown to work in a matter of days not weeks, and its effects seem to last longer, for up to a week. These latest findings now also suggest that it could work in combination with opioid drugs, either to reduce their side-effects or to lower the dose needed for pain relief.

The other drugs surfaced in the database, like diclofenac, might help treat depression differently, by reducing chronic inflammation, a symptom that has become linked to the risk of depression in recent years. As for Botox, it could also have a direct effect on the body and brain that tamps down depression, but exactly how is still a mystery.

Ketamine research meanwhile shows no signs of slowing down anytime soon. Last summer, the pharmaceutical company Johnson & Johnson obtained its second “breakthrough” designation from the FDA for its ketamine-derived drug esketamine, meant to expedite the final approval process. And the company’s early clinical trials have been so far promising.

The current study’s researchers are hopeful their nifty method could be also used to track down other unexpected benefits from already widely used drugs.