So much could go wrong with The Deuce, the possibilities are staggering. James Franco plays his own twin brother. HBO makes a show about objectification and exploitation of black and female bodies, which seems like an exceptional opportunity for HBO to make yet another show by objectifying and exploiting black and female bodies. Set in Times Square in the heyday of its grime, porn, and prostitution, the show’s central character is the city itself, its many characters facets of the neon-and-sweat moment in bars, and street corners. In a lazy-Susan-style narrative, Vincent (James Franco) juggles bar management with his twin brother Frankie’s debts (also played by Franco), while an array of sex workers, of which Dominique Fishback and Emily Meade give stunning standout performances, manage the precarious graces of their pimps and the dangers of working on the street. At the same time, Abby (Margarita Levieva) drops out of NYU and resorts to living a new, haphazard life in the big city. There are easy low roads to take with these stories, easy trapdoors to fall into.

And, miraculously, the trap doesn’t spring. Instead of tumbling down easy roads, the show stands upright and makes strides in the right direction.

The Deuce isn’t a perfect show by any stretch, but the stellar minds and talent of David Simon and George Pelecanos, two operative creatives behind The Wire, shows a mile away.

The sex on the show is, in fitting with its context, extremely business-like and often nearly satirical. In a scene early in the season where Candy (Maggie Gyllenhaal) is servicing a virginal Long Island rich kid, we initially watch her move through the rudiments of a half-hearted routine that we can tell is more rote performance than anything else. And when the boy comes too quickly, before he gets the sex he wanted, Candy switches: she calmly delivers a speech with sharp, precise teeth. This is her job. She’s working the same way that the boy’s father is working when he sells cars at his dealership. She doesn’t allow for any difference, and she won’t be shamed or bossed. It’s as close to a thesis statement as her character gets: she’s always worked without a pimp and is supporting her young son out of her own pocket, and although we see her in plenty of moments of vulnerability throughout the early episodes of the season, that vulnerability and exhaustion does nothing to diminish the viewer’s sense of her power.

The trap The Deuce does not sidestep is the tricky slope of toying with familiar archetypes and ending up with stereotypes. Of all the numerous pimps on the show, only one is white, and he is not shown committing any acts of violence or obscenity, as the many other black pimps are. He’s shown instead—rather obtusely—declaring that he doesn’t go in for “hierarchical structures of power.”

Like Westworld, it could be said The Deuce is HBO making a show about itself, or at least about its reputation over recent years with shows like Game of Thrones and proposals like Confederate: the bluntly sexual and the egotistically cerebral blends with suspense and supremely high production value. But like Westworld, The Deuce is a pleasant surprise where so much could easily go wrong. If that doesn’t sound like high praise, it’s because The Deuce takes a slow build and slow steps to prove itself, instead of proceeding confidently, twisting apologetically out of shape, so that its gleaming thesis-statement moments of power and directness, like Candy’s speech, appear amid sideline aesthetics. But beside the star-studded implosion that was HBO’s last ’70s period piece, Vinyl, The Deuce is comfortably miles ahead and far more driven as it heads toward it’s season finale.