My dad’s company had season tickets to the White Sox. On muggy Midwest summer days we’d go as a family—always sitting in the same seats, 25 rows above first base.

I told this to a counselor I’ll call Bill, when he asked me to remember a childhood memory. It was part of the confrontational circle, a form of group therapy with a self-explanatory name. A half-dozen other clinicians looked on as Bill laid into me. “I bet you don’t go to those games with your family anymore, do you?” Bill asked in a way that felt more like telling. I shook my head no.

It was the summer of 2012, and the beginning of my third round of treatment for an opioid addiction I’d been trying to kick since I was 17. Now, I was 22 and out of excuses for where all my money went. I’d confessed to my mom that the pills I’d been using had escalated to heroin. At the behest of a counselor, I checked in to a residential program, the kind of rehab you probably recognize from television, the kind reserved for serious cases.

This confrontational circle felt more like gaslighting than therapy. Bill’s voice filled with anger when he called me selfish, a liar, a junkie: all the words I called myself. I tried to tell the therapists that my whole body hurt and that I didn’t think my addiction was a “spiritual malady,” like they’d suggested. Bill kept at me. He poked fun at my withdrawal symptoms. He insisted I was arrogant and intellectualizing; I needed to feel the gravity of my situation. Toward the end of the session, I looked up at the other therapists. Their eyes were aimed at the floor.

My stint in rehab occurred at one of the oldest and most reputable treatment institutions in America. Yet the various components of the program were designed to embarrass me—a brutal technique that has little scientific evidence to suggest that it works. In the Handbook of Alcoholism Treatment Approaches, William Miller, a clinical psychologist, ranks the confrontational approach I endured as 45th out of 48 treatments in terms of effectiveness. Hallucinating on psychedelics ranks 32nd. Educational lectures, which we did for an hour or two each day, rank last.

In the US, the treatment community mythologizes “addicts” and “alcoholics”—terms that I’ve stopped using—as developmentally arrested juveniles, and most programs are based on these assumptions. We’re thought of as whiny ingrates who stop maturing the day we start using. Ever since my demeaning stint in rehab, I’ve been trying to reckon with the sorry state of addiction treatment in the United States. That’s what led me to become a journalist who covers drugs and addiction: I wanted to understand why some mental health disorders are treated with medication and effective therapy, while addiction remains stuck in the murky world of folk wisdom. I wanted to understand why so many of my friends were dying.

Little did I know, as I embarked on my search to untangle the field’s failures, that a group of researchers were attempting to reinvent rehab, using technology I’d never heard of. ‘mHeath,’ short for mobile health, is a new kind of treatment delivered by smart phone, not dissimilar from the deluge of programs you’ll find in the app store. But unlike mobile meditation apps or therapy-by-skype, these treatment apps are designed by clinical researchers and offer programs to curb addiction that are based on scientific evidence.

I wanted to understand why so many of my friends were dying.

Most importantly, these apps buck one of the oldest stereotypes of treatment—that unmooring a person from their life is the only way to curb addiction. Granted, apps alone aren’t a panacea that alone can reform the rehab industry. But by building flexible programs that fit the nuances of their clients’ lives, this mini-movement of doctors, researchers, and developers is attempting to give addiction treatment a modern makeover—a welcome smoke signal in the midst of a massive crisis.