A password will be e-mailed to you.

Directed with energy and care by Olivia Wilde, the teen comedy Booksmart has a lot going for it. It is playful and subversive, with two strong lead performances from Kaitlyn Dever and Beanie Feldstein. It is raunchy without being exploitative. The script – co-written by Emily Halpern, Sarah Haskins, Susanna Fogel, and Katie Silberman – is keenly aware of the typical high school social hierarchy, commenting and updating it without much judgment. But what pushes the film into the stratosphere, what keeps it moving and joyous, is its use of music.

Let me back up a little. Music is an integral part of high school movies, but their use can be a little lazy. Throughout his seminal 80s movies, John Hughes set the mold: in The Breakfast Club and Ferris Bueller’s Day Off, for example, the music lingers with the characters. We don’t just hear the soundtrack; we also hear the characters enjoying the soundtrack. There is a better sense of the kids in The Breakfast Club once they dance to “We Are Not Alone,” or when Duckie loses it over “Try a Little Tenderness.” When it’s done well, it’s a shrewd form of character development.

That kind of storytelling shorthand creates a bond between the music and the movie itself, to the point where the songs serve up an extra dose of nostalgia. My formative teen movies came in the nineties, so I’m instantly taken back when I hear Buffalo Tom or Love Spit Love. Still, this is just a co-opting of the John Hughes formula. There is a chicken-and-egg problem with this kind of storytelling. He trusts you’ll connect with the characters because you connect with the music, or vice versa. The most explicit use of this technique is in Easy A, where Emma Stone gradually becomes obsessed with “Pocket Full of Sunshine.” It is such effective character development that most anyone who saw that scene instantly realized that Stone would become a star. The scene is admittedly fun, but it’s also lazy (it references Ferris Bueller in a way that’s more cynical than inspired).

Booksmart completely reinvents how a teen film uses music. The film is filled with it, with some tracks barely lasting fifteen seconds. If most teen films follow John Hughes’ approach as a filmmaker, then Olivia Wilde’s inspiration is Martin Scorsese. The soundtrack barely has time to complete a musical phrase before another song is introduced, and crisp editing further drives that home. If this frenzied musical alchemy sounds chaotic, it is immaterial because Wilde is in tight control of what the audience feels. She rarely lets you get obsessed with any particular tune because she is too busy telling the story of these girls, their friendship, and their attempt to attend one big party before graduation.

The sheer breadth of musical choices is also refreshing. Aside from the score by Dan the Automator,  Booksmart brims with diverse song choices. The soundtrack includes Lizzo, Perfume Genius, Lykke Li, and even Death Grips. Death Grips! It’s admittedly hard to keep track of it all, and that’s precisely the point. Directors use music to give their film an energy, but the teen comedy often has an ulterior motive that could delve into laziness. Her use of music is just one example of what makes Booksmart an utter reinvention of the genre. It’s as if Wilde studied the proverbial playbook, then threw it out.

All that being said, there are a few key scenes where Wilde lets the music linger. I don’t want to reveal them all, but I was impressed when Wilde set a scene with “Open” by Rhye. Not only is the song one of the sexiest of the decade – the first lyric is “I’m a fool for that shake in your thighs” – but the performer and context of the scene add multiple levels of subtext. Without pointing too fine a point on it, Booksmart actually captures the frisson of young, new love in a way that few movies accomplish. This is the mark of a genuine filmmaker, so I cannot wait to see what Wilde does next. Aside from all that, Booksmart is also funny as hell.