Virtually everything about Disney’s latest fairy tale, Moana, is familiar from past Disney films. The studio is still following the broad parameters it started laying down in 1937, with Snow White and the Seven Dwarfs, by reshaping a culturally specific fairy tale to fit a family-friendly, accessible template. Once again, there’s a young woman leaving a safe, comfortable home, venturing into a dangerous world, and finding her destiny, all while singing catchy songs about what she wants and how she’ll get it.

All the narrow parameters are familiar, too, this time from Disney’s Tangled. Like Rapunzel in Tangled, Moana (Hawaiian newcomer Auli’i Cravalho) is brave and ambitious, but also naïve and sheltered, because she’s been held back by overprotective parents with their own agenda for her life. Like Rapunzel, Moana defies family to pursue her own quest. And like Rapunzel, Moana seeks the help of a more worldly and experienced man, who holds her in dismissive contempt until she’s proved herself enough times to earn his admiration. The fact that he’s a boastful demigod instead of a smug thief seems almost beside the point: Both Maui (Dwayne Johnson) in Moana and Flynn Rider in Tangled are flashy, arrogant, and headed for breakdowns when they realize the limits of their talents. And they’re both overshadowed by their plucky young protégés, who start out less cocksure and brash, so they suffer smaller falls whenever they hit a crisis of confidence. Naturally, in both films, there’s an animal companion, a lot of bantery comedy, a solemn moment where the heroine has to decide to press on alone, and some big explosive action when she does.

But the familiarity of the formula doesn’t matter nearly as much as the execution. Moana makes Tangled feel like one of many experiments at tinkering with the formula, getting it exactly right. All the beats proceed exactly as expected, but they hit with admirably precise timing, amid a strikingly beautiful landscape where every leaf is rendered with loving clarity. The humor, the wonder, and the awwww moments all hit home comfortably. This is such a perfect execution of the Disney formula, it feels like the movie the studio has been trying to make since Snow White.

It’s no wonder Disney keeps coming back to different forms of this fairy-tale-derived story, which encourages viewers to relate to a character with boundless drive and goodwill, then lets her triumph in a world that seems determined to make her fail. The Disney-heroine formula isn’t just a standard feel-good underdog story, it’s specifically a story about how determination and good intentions count for more than experience and age. That narrative is particularly friendly to younger viewers, who get to see their fantasies of heroism play out on-screen. But it’s a satisfyingly idealistic stance for older watchers, too.

Moana also draws on a wrinkle familiar from films like Mulan and Pocahontas: The heroine isn’t just buoyed by her own inner strength, she’s drawing on the teachings and traditions of her culture as well. Moana is the daughter of a Polynesian chief, being groomed to succeed her father and advise her people, but she’s as much the recipient of received wisdom as she is its arbiter. Moana directors John Musker and Ron Clements (The Little Mermaid, Aladdin, Hercules, The Princess and the Frog) built an extensive brain trust around designing and vetting the movie to respect the South Pacific myths it incorporates, and to accurately reflect the culture it portrays. There have been missteps along the way — a controversy over a Maui costume that looked suspiciously like a brownface suit; early complaints that Maui’s thick build was a Samoan stereotype — and telling lapses, like the animators making Maui bald, which required an intervention from a Tahitian cultural consultant. But mostly, Moana is refreshingly free from groan-inducing stereotypes, or ridiculous twists like the European invaders leaving the American natives in peace and returning to England at the end of Pocahontas. Moana is respectful to the world it’s evoking — sometimes to a fault, given how carefully calculated and celebratory it is when addressing those cultures.

If the worst that can be said about a Disney film is that it’s too conscious and crafted about its messaging, though, it’s mostly doing diversity right. And within all these familiar parameters and cultural caution, Musker and Clements still find ways to make Moana stand out, and to make it feel spontaneous, joyous, and beautiful. Character movements are based in Polynesian traditional dances and Samoan war dances. Apart from a weak, instantly dated joke about Twitter, the comedy is lively and rambunctious, and it works well to establish the characters. The songs, crafted by Samoan musician Opetaia Foa’i, composer Mark Mancina, and Hamilton composer/star Lin-Manuel Miranda, draw on Polynesian drumming and choral vocals for a rich, hypnotic sound. And the best of them — Maui’s smarmy “look how great I am” anthem “You’re Welcome” and the twisty, Bowie-esque phantasmagoria “Shiny,” sung by Flight of the Conchords’ Jemaine Clement — are just upbeat, earwormy show tunes, the kind that send audiences out of the theater humming.

Above all, though, Moana feels like the endpoint of the slow-burn modernization process that Walt Disney Animation started shortly after the Disney Renaissance kicked off. The Little Mermaid revived the studio’s reputation for memorable animation, songs, and stories, but Beauty and the Beast started bringing its old stories into a modern era, by giving its heroines personality beyond the traditional “I Want” song, and agency that wasn’t usurped as soon as the bland love interest entered the picture. It’s been a slow road to self-realization for Disney heroines, but the old tropes have steadily been strengthened through films like Mulan, Lilo & Stitch, The Princess and the Frog, Tangled, Zootopia, and Frozen.

And now here’s Moana, a fully rounded character with an idealized yet believable body, flaws that she acknowledges and fights, and a resourcefulness that makes her admirable even when she’s failing. She doesn’t even need a love interest to define her story. Maui, a tattooed trickster with all Johnson’s gleaming-toothed charm, is compelling, but he’s also ageless and inhuman, so it’s a relief when he doesn’t start giving his traveling companion the hey-baby eye. Moana is all about familiar patterns, refined to their ultimate forms, and presented with a satisfying energy and power. But Musker and Clements also have the sense to pick and choose which tropes make sense for their story. As perfectly as these old beats work in this new context, Moana functions as well as it does because the story team ultimately focused on finding everything about Disney stories that worked in 2016, and improving everything that didn’t.

How filmmakers manipulate our emotions using color