This week, Netflix released Mae Martin’s second collaboration with the streaming giant: Wayward, a thriller about detective Alex Dempsey (played by Martin), who moves to Tall Pines, a small town that’s home to a school for “troubled teens,” Tall Pines Academy. Dempsey quickly discovers the school and town are harboring dangerous secrets and starts working with two Toronto teens trapped in Tall Pines Academy.

The series also stars Sarah Gadon, Sydney Topliffe, Alyvia Alyn Lind, Brandon Jay McLaren and Toni Colette.

“I often talk around adolescence, or I write characters who are processing their teens,” Martin told Netflix’s Tudum ahead of the show’s release. “It was such an intense time for me, and is for everyone, but I’ve always known I wanted to more directly dive into that time and all the visceral feelings of adolescence.”

Did Martin’s feelings and experiences shape Wayward? Read on to find out if the new Netflix thriller is based on a true story.

Martin was inspired by a friend who went to a school for troubled teens

Although the events that occur in Wayward are fictional, Martin told Tudum that a friend who attended a school for troubled teens inspired the series.

“I started developing Wayward based on a lot of things, but, mainly, my own experiences as a young person. I was a wayward teen in the early 2000s, and my best friend Nicole was sent to one of these ‘troubled teen’ institutes when she was 16. When she came back and shared her stories, I became pretty obsessed with the industry,” Martin revealed. “I was deeply intrigued to learn that a lot of its origins actually came from self-help groups and cults in the ’70s — and how there can be huge profits and often questionable practices. I knew it was rich for thriller territory.”

Nicole was a consultant on the series, and the show’s writers’ room included someone who also attended an institution for troubled youth.

Martin was also inspired by the ’70s self-help cult Synanon

Cosmopolitan reported that Martin also drew inspiration from the Synanon religious movement, founded in 1958 by Charles Dederich, a former alcoholic who got sober after participating in Alcoholics Anonymous. While working on the program, Dederich thought people weren’t opening up enough and sought to change that with Synanon.

“In researching these schools — a lot of which are now being talked about in different documentaries, I learned about Synanon. That was a self-help cult in the ’70s in LA, which was ultimately shut down, but it kind of transformed and was part of the beginnings of the ‘troubled teen’ industry. So we took those facts and then dialled them up a bunch,” Martin told Tudum.

Synanon offered a form of group therapy called ‘the Synanon game’ in which participants would scream at each other and tell them what they thought of each other, then they’d hug.

Wayward includes a similar game. In Episode 3, Tall Pine Academy students are forced to play “Hot Seat,” where they disparage their classmates before concluding the “game” with a hug.

Martin and ‘Wayward’ co-showrunner Ryan Scott found inspiration in fiction

Martin and Wayward co-showrunner Ryan Scott also drew inspiration from fiction to create the thriller, drawing on films such as Girl, InterruptedGet Out and Fargo.

Of the show, Martin said, “It’s like if you took the kids from Booksmart and put them in One Flew Over the Cuckoo’s Nest.”