Aaron Sorkin has had some trouble when it comes to his female characters. It’s not that Sorkin has never written a good female character; he has – C.J. Cregg on The West Wing immediately springs to mind. But more often than not, Sorkin has a tendency to reduce women to roles in which their biggest character trait is how well they stand beside powerful, smart men.

So it’s interesting that for his directorial debut Molly’s Game, Sorkin chose to helm a feature about a woman. Perhaps the writer was issuing a challenge to his critics – “I’ll show you once and for all that I can tell a story about a strong female character without resorting to mansplaining.”

The strong female character in Sorkin’s first feature behind the camera is Molly Bloom, a remarkably determined woman who goes from being an Olympic skier to making millions running an exclusive high-stakes poker game, first in Los Angeles then in New York. Portrayed with fire and resolve by Jessica Chastain, Molly Bloom is still very much a Sorkin character, prone to the rapid-fire repartee that Sorkin excels at.

Yet Molly’s Game differs from the recent scripts Sorkin penned in one distinct way: Molly Bloom is a good person. Unlike the anti-heroes at the center of Sorkin’s The Social Network or Steve Jobs, Molly isn’t glib or dismissive of everyone and everything around her. She genuinely strives to do the right thing, takes a few wrong turns, and then strives to do the right thing again. There’s a goodness to the character that almost seems unrealistic, yet Sorkin’s script and Chastain’s performance make it work.

Molly’s Game opens with an absolutely dynamite prologue that introduces us to Molly Bloom on one of the least enjoyable days of her life. While competing in the Olympics, a stray pine branch snags one of Molly’s skis and sends her flying. It’s a moment that will pepper the entire story, and Sorkin keeps coming back to it again. Full of quick cuts and informative inserts, it’s a brisk whirlwind of a beginning that the rest of the film struggles to keep up with.

Molly gets busted for running illegal poker games two years after the fact. Her only recourse is to hire defense attorney Charlie Jaffey (Idris Elba), who seems reluctant to take Molly’s case at first – especially since she can’t pay him – but who eventually comes around. Here at last, the oft-misused Elba has a film role worthy of his considerable talents. The chemistry between him and Chastain is electric, and near Molly’s Game’s end he’s given one hell of a speech; the type you can expect to see popping-up during a lot of award ceremonies.

But this is Chastain’s movie through and through. At this point in her career, it seems almost futile to keep repeating what an incredible actress Chastain is. What else is new? But once again, Chastain crushes it, storming through this film like a hurricane. The performance is so good that it’s almost a crime that Sorkin decided to overlay the film with constant narration. Sorkin may be one of the best dialogue writers working today, but that’s a talent that works best when he’s having two characters bounce that dialogue off each other. With narration however, it starts to weigh things down to the point that you start to wish narrator Molly would just pipe down and let on-screen Molly get a word in.

The moments where the narration does work are the poker scenes. It’s hard to make poker cinematic. Remember how clumsy it was in Casino Royale when Giancarlo Giannini would lean over to Daniel Craig and whisper what the heck was going on in the card games? Thankfully there’s none of that here. Molly’s narration coupled with some inventive editing helps the card game scenes seem vital and alive.

Molly’s Game is not a complete departure from Sorkin’s typical oeuvre. The script gives Molly some daddy issues, courtesy of her demanding pop played by Kevin Costner. Costner is quite good in the part, and the film gives him a big emotional moment near the end that would’ve been perfect had Sorkin’s script squandered it by adding some very heavy-handed junk about how Molly has done everything in her life as a way of trying to control strong men. That bit of dialogue threatens to derail the entire film, but thankfully it passes quickly.

Sorkin is a better writer than director. The first half of Molly’s Game has considerable more energy than the second, to the point that it starts to feel like two different movies. Still, there’s an air of excitement radiating off Molly’s Game, and the film ends on a truly hopeful note that’ll have you walk out of the theater feeling like you just ended a poker game with a royal flush.