Spider-Man: Homecoming isn’t just focused on the big, heroic moments in a superhero’s life. It’s about the small details of what it’s like to be a 15-year-old with friends, a home life, a secret crush, and a secret identity. So it’s only natural that the film spends a lot of time with protagonist Peter Parker as he navigates the demands of high school. And the filmmakers consciously decided to depict Peter’s school as an academic pressure-cooker filled with science electives and nerdy extracurriculars. That setting is crucial to the tone of Spider-Man: Homecoming, and it parallels Peter’s coming-of-age as a superhero.

Warning: Spider-Man: Homecoming spoilers ahead.

In the film, Peter isn’t a model student. He skips Academic Decathlon meetings and quits band practice in favor of punishing a guy for breaking into his own car. Scolded by a friend for ignoring his schoolwork, Peter says he’s beyond high school. But his academic life at Midtown Science is nevertheless an appropriate backdrop for his greater aspirations to save the world. In December 2016, news surfaced that Tom Holland did research for the role of Peter Parker by attending the Bronx High School of Science for two days, fooling his fellow students with a fake name and accent. (Holland is originally from the UK.) As a model for an institution that can turn out budding scientists and “man in the chair” hackers, Bronx Science was a worthy choice. The high school has eight Nobel Prize Laureates and countless war veterans among its alumni. (The movie wasn’t filmed there, though. The filmmakers instead used two Los Angeles magnet schools: Van Nuys and Reseda.)

I graduated from Bronx Science in 2013, and watching Spider-Man: Homecoming brought back a lot of memories about its unique, competitive environment. The film’s accurate depiction of a high-pressure STEM high school accentuates Peter’s struggles as a young, underappreciated superhero. In places like Bronx Science, almost everyone is a self-identified nerd with advanced science classes and quirky side hobbies.

Peter’s senior girl crush is Liz. She reads coaching books, listens avidly to self-improvement TED Talks, and considers raiding the minibar and swimming to be rebellious nighttime activities while she’s on an Academic Decathlon field trip. I remember my own speech and debate team field trip: my mom handed me a crisp $20 bill and I enjoyed a whole Nerds candy rope and a family-sized bag of Cheetos, feeling like a million bucks.

The shirt Peter Parker wears toward the end of the movie depicts one atom saying, “I think I lost an electron?” and another asking, “Are you positive?” STEM high schools are full of this bright, quirky humor that some might shun as too nerdy — while others, like myself, embraced it.

it takes guts, grit, and scrappiness

Despite the more lighthearted moments, in that kind of competitive battleground, everyone becomes a missile striving to strike their target. In Bronx Science, that meant an Ivy League college education. I dedicated months of studying to ace the SAT. Others dedicated years. A friend from Stuyvesant, another STEM school in the city, began studying for the SAT in seventh grade, and then turned around to tutor her younger sister when she was done. When my guidance counselor said I probably couldn’t get into Yale, I cried and then tried to prove her wrong. (I got into Wellesley and Vassar, but not Yale.)

From the strict gym classes with awkward demonstrations (although we never had Captain America giving us prerecorded lectures), to the suspiciously similar school logo, the similarities between fiction and real-world intensity seem never-ending.

This metaphor for academia as a pressure cooker that tests and challenges young people until they come out as something stronger is most obvious in the climax of the film, when villain Adrian Toomes (Michael Keaton) tricks Peter and buries him deep in a pile of rubble, thinking that will be the end of his adversary. Underestimating him and his unrealized potential is the Vulture’s biggest mistake.

Struggling against the heavy rocks, Peter nears the last of his strength, and the situation grows hopeless as he’s scared and vulnerable. But he doesn’t merely look on angrily the way he does when he gets bullied in school, or shirk his responsibilities the same way he’s inclined to blow off band practice. Instead, he shouts and breaks out of the earth. It echoes an iconic moment from the comics, but it’s also Peter realizing his full potential: it may not be through school itself, but it’s the same kind of self-realization that students in STEM schools are pushed toward every day. When he does emerge to confront Vulture, even the villain has to admire Peter’s determination.

The overall takeaway we get from watching Spider-Man: Homecoming is that it’s not easy working your way up to becoming a kid genius in the same way that it’s not easy becoming a superhero. But it is possible — it just takes guts, grit, and a scrappiness that even the film’s supervillain admits he’s impressed by.

The one thing Midtown Science is missing? Homework.