Spoilers for Iron Man 3 follow.

Want to see one of the more progressive portrayals of women in a blockbuster movie this year? Then go see Iron Man 3. As incongruous as it sounds, it’s true: director Shane Black and his co-writer, Drew Pearce, managed to turn women into the stealth stars of a superhero film by flipping the script on stereotypes about female characters and making them interesting, mature human beings who actually do things.

Just ask Rebecca Hall, who plays scientist Maya Hansen, about her character: “Frankly, she’s the driving force of the entire narrative,” she told Wired.

If that seems like a bold statement about a secondary character in a film, consider that the genius in Iron Man 3 who creates a powerful—indeed, perhaps too powerful—form of technology capable of changing the world isn’t Tony Stark; it’s Maya. And the hero who ultimately saves the day by taking out the bad guy in smash-em-up physical confrontation isn’t Tony Stark; it’s Pepper Potts. Sure, Tony Stark and the Mandarin are ostensibly the hero and the villain, but if you look at the things that people actually do rather than where the camera happens to focus, the female characters are the ones who truly begin to shine.

One of the most important things about Iron Man 3—particularly as a film in the superhero genre, whose iconic heroes tend to be white guys created by white guys circa Mad Men or earlier—is the way that it allows its female characters to evolve from minor to meaningful. Initially introduced as one of Tony’s sexual conquests from his pre-Pepper days, Maya could have easily been relegated to little more than a Bond Girl. Instead, her intellect and ability create the impetus for the entire film: a weapon that might have been powerful enough to destroy Tony Stark—if he hadn’t been saved, in the end, by a woman. Similarly, Pepper Potts starts out as Tony’s assistant, and becomes up not only as the CEO of Stark Industries, but transforms into a superhero herself.

According to director Shane Black, this script-flipping wasn’t an accident, but rather a deliberate attempt to address the stereotypes faced by female characters in film. “It was important, especially to take the curse off the damsel in distress thing,” Black told Wired. “I have a hankering for empowered females trashing stuff.”

And not just empowered females, but also confident and secure ones. There’s a scene in the film where Maya shows up at Tony’s home and comes face to face with Pepper, who’s very aware of her history with Tony. There’s a bit of a record scratch where you expect the stereotypical claws to come out—and they don’t. The women briefly acknowledge Maya’s history with Tony, and then instantly move on to more pressing matters without a hint of cattiness.

“To be honest with you, it’s one of the main reasons why I took the job,” said Hall. “At first I thought, oh, they’re bringing another woman in; it’s probably going to end up in some sort of horribly reductive, stereotypical catfight. And when I saw that it wasn’t–that it was actually daring to write something grown-up and sophisticated where women are actually bigger than being defined by the people they’ve slept with–it was great.”

“They’re both such strong characters in and of themselves,” *Iron Man 3 *co-writer Pearce told Wired. “And they both have so much more going on in their lives than the fact that one of them slept with Tony once and one of them is sleeping with him now. We love the idea that it’s completely incidental, and they don’t get catty about it. Maya could give a shit that she [slept with Tony], and Pepper knows exactly what Tony was up to all those years.”

“Maya wasn’t even that taken with him,” added Black.

“Tony says, 'it was a great night,' and she goes 'weeeelll,'" laughed Pearce.

Even more notably, there's a scene devoted entirely to a conversation between the two women, where they discuss Maya's work on the Extremis technology, and the threat they're facing from the Mandarin. Their shared sexual history with Tony Stark doesn't come up, probably because the CEO of a multinational corporation and a brilliant scientist who figured out how to regenerate lost limbs have more important things to discuss in the middle of a crisis.

It also means that Iron Man 3 passes the Bechdel Test, a benchmark created by cartoonist Alison Bechdel to gauge gender bias in entertainment using three simple criteria: Are there more than two women in the work? At any point, do they talk to each other? If so, do they talk about something other than a man? It's a litmus test that a surprising number of movies fail–including the feminist-friendly Joss Whedon's Avengers–but Iron Man 3 passes with flying colors.

When I tell Hall that the film passes the Bechdel Test—and what that is—she replies, “Yes, that’s brilliant. That’s exactly it... They’re smart women, and that’s what people want to see now. That’s the stuff women are complaining about when they say that no one writes good female characters. Sure, you can get big characters in movies that are women, but no one is writing them as particularly interesting.”

Of course, for all the good work that Iron Man 3 manages to do within its context—a blockbuster film in a traditionally male genre helmed by a male character—it is still just that: a blockbuster film in a traditionally male genre helmed by a male character. Despite the billions of dollars that audiences have lavished on capes-and-tights flicks, we still have yet to see a single (successful) superhero movie centered around a female character.

And the saddest part about the exceptional women of Iron Man 3 is exactly how optional they are. Pepper Potts and Maya Hansen didn’t need to be strong characters who do interesting things, and the only reason they are is that the men making the movie personally happened to think it was important, and slipped them more interesting roles under the radar in a film titled–and centered on–Iron Man.

Ultimately, what Iron Man 3 does isn’t revolutionary; or at least, it shouldn’t be. The truly surprising thing should be how surprising it feels to have two smart women (more than one!) talking to each other in a movie about something other than a man. It’s something that women experience every single day of their lives, and its comparative rarity in our entertainment should make us feel a constant sense of incongruity–like something is missing.

Instead, we experience it as so normal that the scenes between Pepper and Maya are literally remarkable; we register surprise. “I applaud Marvel for keeping [the scenes] in because it would have been very easy for them to say, ‘no one’s interested in that stuff in a film,’” said Hall. “But the truth is that actually they are, because I have yet to do an interview where someone hasn’t [mentioned] exactly that.”