“Your struggle is with the sin of same-sex attraction,” says the counselor at the gay-conversion therapy center. “You’re facing the consequences of your actions, and it’s ugly.” Here’s the first trailer for The Miseducation of Cameron Post, starring Chloe Grace Moretz as the titular teen who was caught having sex with the prom queen and sent off this place.

The all-business facility for teens is run by the strict Dr. Lydia Marsh (Jennifer Ehle) and her brother, Reverend Rick (John Gallagher Jr.) — himself an example of how those in the program can be “cured.” In the face of outlandish discipline, dubious methods and earnest Christian rock songs, Cameron forms an unlikely gay community, including the amputee stoner Jane (Sasha Lane) and the Lakota Two-Spirit, Adam (Forrest Goodluck). In creating a family on her own terms, she learns what it means to empower herself and have confidence in her identity.

Co-starring Emily Skeggs and Owen Campbell, the film won the Grand Jury Prize in the U.S. Dramatic Competition at Sundance in January. Desiree Akhavan directs from a script she wrote with Celilia Frugiuele based on the novel by Emily M. Danforth. FilmRise opens The Miseducation of Cameron Post in select cities August 3. Check out the trailer above.