For author Emily M. Danforth, the film adaptation of her 2012 novel, The Miseducation of Cameron Post (HarperCollins/Balzer + Bray) is exactly what she wishes she might have seen when she was growing up. “I love the film so much!” she told PW. “It would have meant the world to me as a closeted queer teenager in rural Montana.” The story’s titular protagonist is coming of age as a gay teen in Miles City, Mont., in the 1990s. Following the untimely death of her parents, and after being caught by her boyfriend kissing a girl on prom night, Cameron’s aunt arranges for her to be sent to a gay conversion therapy facility known as “God’s Promise.” The film stars Chloë Grace Moretz as Cameron, with Sasha Lane and Forrest Goodluck playing Cameron’s friends Jane and Adam. Directing the film is Desiree Akhavan, who co-wrote the screenplay with Cecilia Frugiuele.

Danforth, who was in frequent contact with the writers and was consulted on several drafts of the screenplay, praises the way that the adaptation streamlines the book, saying that the screenwriters “so beautifully condensed the storyline without sacrificing its voice and spirit.” The book (at nearly 500 pages) focuses significantly more on Cameron’s life before her arrival at God’s Promise; the film largely takes place at the conversion center. There, Cameron comes face-to-face with individuals who believe that homosexuality is a sickness to be overcome through connection with God.

With an eye toward verisimilitude, the writers consulted with individuals who have been subjected to conversion therapy. In a recent joint interview with danforth and Akhavan on NPR’s Fresh Air, danforth shared that, while she never personally experienced conversion therapy as a teen, the “threat” was very present throughout her upbringing. “Gay conversion therapy loomed large in the landscape of my life as a closeted teenager growing up, much like it does for Cameron,” she said.

Akhavan spoke to Fresh Air about how her interest in adapting and directing danforth’s story arose from the desire to not only address the damage inflicted upon teens by conversion therapy, but to explore a more overarching “prescribed rule book for behavior” that impacts choices about gender, sexuality, and identity as a whole. Her affection for the book was also an intimidating factor: “I was terrified to make The Miseducation of Cameron Post,” she said. She added that she felt the book was “so masterfully done in tone. With the balance of humor and genre, it felt bigger than me. I really [didn’t] want to mess that up.”

From danforth’s perspective, the film (and Akhavan) succeeds: “I think [the film] nails the comedic and (predominately) hopeful tone of the book, which is no small task given the era and the conversion therapy subject matter.”

During the early stages of the film’s development, Akhavan and danforth visited Montana together. They had hoped to set and film the movie there, but budgetary concerns prevented that from happening; instead, the film is set in upstate New York. Danforth visited the set on two occasions and even appears in the rock concert scene with her wife. “I’m so happy that this film made by queer people is giving attention to this shamefully timely subject,” she said. “I feel very lucky and honored that such a funny and warm and honest queer film was made of my novel. And if you want more of Cam’s backstory you can have that, too—if you read the book!”