Aaron Starmer’s 2016 YA novel, Spontaneous, is simultaneously a horror story, a love story, a wacky comedy, and a meditation on loss. One would expect such a genre mashup to be a confused mess—but instead, as Kirkus’ starred review noted, it’s a “blood-soaked, laugh-filled, tear-drenched, endlessly compelling read.” Its new movie version, starring Katherine Langford and Charlie Plummer, is even more impressive, as it manages to improve on its source material in subtle and unexpected ways. It premieres on video-on-demand on Oct. 6.

The book begins with a literal bang, as teen narrator Mara Carlyle recalls a fateful day in high school when everything changed—when her classmate, Katelyn Ogden, mysteriously and inexplicably “blew up in third period pre-calc,” like “a balloon full of fleshy bits.” Weeks later, another student blows up, and then another, at a high school football game. The only thing the victims have in common is that they’re all seniors at the same New Jersey high school. Government agents and scientists try to figure out what causing the explosions as rest of the senior class tries to maintain some semblance of normalcy—even as more of their number go boom. Meanwhile, smart-alecky Mara pursues a new relationship with a soft-spoken fellow senior, Dylan Hovemeyer, whom she barely knows, and who has a few mysteries in his past.

In the book, Mara’s snarky narration keeps things light but also firmly grounded in reality. Even as she and her friends live under the threat of instant, gory death, they still gossip and drink and do drugs and make out, as teens do. Sly jokes abound, such as a performance of Leonard Cohen’s “Hey, That’s No Way to Say Goodbye” at a memorial service (preserved in the film). Later sections movingly portray Mara’s sense of loss in a way that feels real and deeply felt. However, Starmer’s tale also goes off on numerous tangents that seem unnecessary—there’s a small riot in the wake of a saintly, disabled kid’s death, for example, and later, a smug anthropologist/pharmacologist shares her thoughts on spontaneous combustion. There’s also a strange and tiresome subplot in which Mara wonders if Dylan is the biological father of an annoying young woman’s triplets. The book also spends far too much time on the central mystery, spinning up theories that lead nowhere.

The film does away with much of this excess and instead focuses more on the relationship between Mara and Dylan. It’s a brilliant move on the part of writer/director Brian Duffield, who’s no stranger to smart horror-comedy; he also wrote the 2017 Netflix gorefest The Babysitter. Langford is appealingly cheeky as Mara, while Plummer, as Dylan, has a pleasant earnestness and a sense of fun that the book’s underdeveloped character lacks. The actors also have truly amazing chemistry together, so it makes sense that the film would put them together as much as possible. When circumstances finally separate the pair, it’s genuinely heartbreaking.

It’s only toward the end of the story that Spontaneous most obviously reveals itself as an allegory about school shootings, as numerous kids explode, one after another, and others around them flee in terror. In the film, this scene is bone-chilling, and the aftermath, in which survivors deal with the sudden, bloody loss of friends and family members, shifts into serious and ultimately profound territory. Langford—who once starred in the Netflix show 13 Reasons Why, about a teenager’s suicide—knows this landscape well, and she modulates her performance with amazing skill. Chelah Horsdal, as the mother of one of the victims, gives an achingly sad performance over the course of a single scene.

And yet, the film ends on an uplifting, but surprisingly complex, note: Life goes on, yes—but death is a part of life, too. As Jon Bon Jovi once sang, in what Mara calls “the only song that everyone in New Jersey knows by heart”: “It doesn’t make a difference if we make it or not. / We’ve got each other, and that’s a lot for love. / We’ll give it a shot.”

David Rapp is the senior Indie editor.