It’s been nearly a year since actor Matthew Perry, best known for playing Chandler Bing on the show “Friends,” died from a ketamine overdose and drowning in his hot tub. News broke Thursday that five people had been charged in connection to his death, including two doctors, Perry’s assistant and a woman accused of being a drug dealer. The actor had used ketamine infusion therapy for depression and anxiety , but seemed to become increasingly reliant on the drug toward the end of his life , according to law enforcement officials.

Though ketamine has long been known as Special K, a party drug, it has also been established as an effective treatment for depression, with proper dosing. Below, experts share what to know about ketamine therapy and when it can become unsafe. Ketamine therapy is effective for treatment-resistant depression.

Ketamine is prescribed to people who have “treatment-resistant symptoms of depression,” according to Dr. John Krystal , the chair of the Department of Psychiatry at Yale School of Medicine in Connecticut. “In other words, they’ve tried more than one antidepressant and they’re still not really getting the clinical response they need,” said Krystal, who is one of the original researchers on ketamine treatment for depression.

Two of the more common kinds of depression medication are selective serotonin reuptake inhibitors, or SSRIs, and serotonin and norepinephrine reuptake inhibitors, or SNRIs. Medications like Lexapro, Zoloft and .