Warning! This article contains spoilers for Don’t Look Up

The bleak and deadly ending of Don’t Look Up contains a hidden note of optimism. A satirical disaster comedy with record-breaking Netflix ratings, Don't Look Up tells a grim tale about a world too distracted to pay attention to its own impending doom. However, scientist Randall Mindy’s final scene also carries the message that it’s never too late to change.

A major antagonist of Don’t Look Up is billionaire tech CEO Peter Isherwell, who tries to profit from the impending apocalypse. A caricature amalgamation of the world’s wealthy technocrats, Isherwell is the embodiment of technological hubris, boasting about his company’s algorithm, and how its predictions are accurate “to 96.5%.” As a blatant egotist, however, he does not take criticism well. During the second act of Don't Look Up, as Isherwell means to send spacecraft to mine the comet, Mindy tries to question him about it. Isherwell's only response is to undermine Mindy. He coldly says that, thanks to the algorithm, he knows everything about Mindy, including how he’ll die. Isherwell taunts Mindy, about how he chooses to “run towards pleasure and away from pain,” before saying that his death was so “unremarkable and boring” that he can only remember a single detail. In one of the few moments where Isherwell makes eye contact with anyone during the entire movie, he states flatly, “you’re gonna die alone. Alone. Mindy is left distressed, trying to explain that he was just doing his job.

Related: Don’t Look Up: The Inspiration For Jonah Hill’s Character Makes Him Even More Unlikeable

However, Dr. Mindy’s final moments, at the ending of Don’t Look Up, prove Isherwell wrong. Mindy does not die alone but is surrounded by his closest family and the friends he’s made. The scene of them seated around a dining table, an inversion of the sterile boardroom meetings earlier on, is one of the most honest and warm-hearted moments of the whole story. It’s an understated sentiment in a movie full of over-the-top melodrama, but the clear message is that Mindy — and, by extension, everyone else — is not a slave to determinism and technological algorithms. Instead, he is free to choose his own path.

Peter naked on an unknown planet in Don't Look Up

In sharp contrast, Isherwell’s algorithm predicts Orlean’s death to a hilariously improbable degree of accuracy. While the two are talking, he says that his algorithm has predicted that she’ll be “eaten by a bronteroc,” before laughing that he doesn’t even know what a bronteroc is. This joke comes back to literally bite Orlean in the face during Don’t Look Up’s mid-credits scene. Thousands of years later, after all the rich people travel through deep space to an exoplanet, Orlean is immediately attacked (and presumably eaten) by a bird-like alien creature. Seeing this, Isherwell remarks, “I believe that’s called a bronteroc.” The scene’s close hints that the group of billionaires, all stark naked to highlight their complete and utter vulnerability, do not have good chances of survival.

In subtext, Don’t Look Up implies that Isherwell’s algorithm only works on people who are just like him. Comically egotistical and totally resistant to change. President Orlean is just such a person. Vain and self-absorbed, she never changes throughout the movie. Dr. Mindy, however, realizes that he's clearly made some terrible mistakes during the events of Don't Look Up. Knowing what his future could hold, he makes the conscious decision to change. Had he not done so, it’s very likely that he would’ve had exactly the end that Isherwell said he would. Instead, he chooses to face his problems, discarding the hedonistic lifestyle he’s become caught up in. After choosing to speak the truth, he returns home to repair his relationship with his wife. Evidently, Isherwell’s algorithm cannot predict humanity and compassion.

The most optimistic message of Don’t Look Up, hidden amongst all the farce and absurdity, is that it’s never too late to change. The algorithms which increasingly determine our technological interactions cannot predict everything. A better scenario is always possible. If it’s not too late for one person to change their path and go towards a different future, maybe it’s not too late for all of us to do so. Together.

Next: Don’t Look Up: Why Is Nobody Listening?