For a film franchise that’s more than 40 years old, Star Wars has had a surprisingly hard time finding its voice lately. J.J. Abrams’ The Force Awakens successfully relaunched the series after a 10-year cinematic hiatus, but some fans felt it copied George Lucas’ original 1977 film too closely. The standalone Rogue One: A Star Wars Story attempted to use the fantasy world to tell a gritty wartime tale, but Disney was ultimately unhappy with the result, and writer-director Tony Gilroy was brought in to help Gareth Edwards’ film over the finish line. Last year, writer-director Rian Johnson pushed the series in intriguing new directions with Star Wars: The Last Jedi, but that also led to fan complaints — this time, that the installment had veered too far from the franchise’s basic tenets.

The current gatekeepers’ struggle to define Star Wars after Lucas’ retirement has put a spotlight on the troubled production of the series’ latest film, Solo: A Star Wars Story. After six months of shooting, original directors Phil Lord and Chris Miller (The Lego Movie, 21 Jump Street) were fired from the production over creative differences, with Apollo 13’s Ron Howard stepping in to replace them. And Howard didn’t just provide some tweaks on the way to locking the movie up; he reportedly reshot 70 percent of the film, work so extensive that at least one role had to be recast entirely due to scheduling conflicts. If Star Wars is dealing with an identity crisis, no film should provide more on-screen evidence than Solo.

But like its title character pulling off a crazy scheme just in the nick of time, Solo is a swashbuckling success, a space adventure that pays homage to the DNA of the original films while carving out its own unique space in the canon. It’s a sheer delight, but it also has the courage to explore the darker aspects of a character who could have all too easily been polished to an inoffensive, family-friendly Disney sheen. Solo represents the most refined iteration yet of the new Disney / Lucasfilm formula — and cements longtime series screenwriter Lawrence Kasdan’s place as the defining voice of the Star Wars universe.

Spoiler warning: the only plot details ahead are the ones that have already been revealed in Solo trailers — which isn’t much.

Alden Ehrenreich (Hail, Caesar!) plays the younger version of Harrison Ford’s iconic title character, and the story follows him as he meets a crew of criminals led by a man named Beckett (Woody Harrelson), partners with Chewbacca (Joonas Suotamo), and meets Lando Calrissian (Donald Glover, every bit the scene-stealer the trailers promised). The Millennium Falcon is involved, and a woman from Han’s past named Qi’ra (Game of Thrones’ Emilia Clarke) plays a role. So does the nefarious head of a crime syndicate, played by Paul Bettany. But the beautiful thing about Solo is that it’s easy to talk about the film without bothering with the plot machinations, because this is a film focused on adventure.

It’s ‘Casino Royale’ for Han Solo’s James Bond

It’s part heist movie, filled with near-miss scrapes and daring escapes. It’s part Western, full of betrayals and standoffs. And it’s got a dash of screwball romantic comedy as well. It’s a multi-genre mix that calls to mind the original A New Hope and The Empire Strikes Back. It doesn’t share the same vast intergalactic scope, but it feels like Star Wars, in concrete, definable ways that some fans have argued has been missing from more recent franchise installments.

But Solo succeeds because it’s not interested in just being a greatest-hits mixtape. There are familiar scenarios, and plenty of moments of fan service — some better executed than others — but with Solo, the filmmakers are interested in actually exploring a key part of Han Solo’s character. It’s a story about how he became the guy Luke Skywalker and Obi-Wan Kenobi met in Mos Eisley Cantina, but that doesn’t mean staging an interlocking series of events that lead up to that moment, as the prequels did. Solo is about the events that shaped him into a smuggling scoundrel. It’s Casino Royale to Han Solo’s James Bond.

Just because it’s taking the character seriously, it doesn’t restrict the comedy, however. Lord and Miller originally wanted to make a much more freeform, improv-flavored comedy in the style of their other films, and when Howard came on board, he reportedly steered Solo back in the direction of the script written by Empire Strikes Back and Raiders of the Lost Ark screenwriter Lawrence Kasdan and his son, Jonathan. But comedy nevertheless runs throughout the film, thanks in no small part to the cast. Ehrenreich’s take on the character centers on a familiar swagger and his own riff on Harrison Ford’s smirking grin. Glover channels his predecessor — close your eyes, and you can almost believe it’s Billy Dee Williams delivering some line readings — while still making his Lando slicker, more charming, and more modern than the 1980s iteration.

The rest of the cast performs just as admirably. Harrelson’s Beckett is a worthy straight man to the comedic antics, and Clarke seems to relish playing the mystery of the enigmatic Qi’ra. Thandie Newton, as one of Beckett’s crew, adds a flavor of danger that’s markedly different from what she brings to Westworld, and Paul Bettany fits wonderfully into the pantheon of British Star Wars bad guys. And amid all of these wonderful human characters, there’s Lando’s droid, L3-37 (Fleabag star and Killing Eve creator Phoebe Waller-Bridge), one of the more unique, hilarious, and touching characters Star Wars has seen in some time.

Phoebe Waller-Bridge creates one of the most unique droids in the franchise

Given the tortured production, it’s nearly impossible to watch the film without wondering what footage Lord and Miller shot, and what big beats may remain from their version. To Howard’s credit, it’s impossible to tell. The film does start sluggishly, with Ehrenreich not really finding his footing with the character until after the opening sequences are well out of the way. Depending on the shooting sequence, it’s possible those scenes led to some of the alleged concerns over his performance. But once the film properly finds its rhythm — audiences will undoubtedly recognize the exact moment it happens — the movie takes off and never really lets up until the final frames. There are some big moments of exaggerated physical comedy that could be artifacts of another version, but they play so seamlessly that trying to spot them is nothing more than reading tea leaves. Once Solo gets cooking, it’s as cohesive as Star Wars gets, and ultimately, that comes down to the script.

When it comes to the Star Wars franchise, no one other than George Lucas himself has had more of an authorial voice than Lawrence Kasdan. He’s a multi-hyphenate in his own right, having written and directed movies like Body Heat, The Big Chill, and Wyatt Earp. But he also co-wrote The Empire Strikes Back, Return of the Jedi and The Force Awakens. He served as a consultant on The Last Jedi. When audiences rattle off their favorite Star Wars movies, they’re more likely than not to name a film Kasdan wrote. And most would consider all of his films franchise classics, something even Lucas himself can’t say. Han and Leia’s rapid banter in Empire — the same kind of dialogue that made Rey and Finn’s exchanges in The Force Awakens feel so right to audiences — is vintage Kasdan, and it’s clear that his vision of Han Solo is driving this movie from beginning to end.

‘Solo’ captures the essence of classic ‘Star Wars’

For some fans, the allure of Star Wars has been more than just mythic archetypes (which many franchises have) or iconic spaceship designs and aesthetics. (Film history is littered with other examples of those, too.) It’s about a fictional world that embodies a specific kind of genre mash-up, with an elevated B-movie sensibility. It’s about bantering, sarcastic characters that often do the dumbest things possible, but manage to scrape by because ultimately, their hearts are in the right place. When fans talk about something feeling like Star Wars, they’re often referring to Kasdan’s take on those ideas. And by the end of Solo, it’s difficult to argue that anyone can capture that core sensibility better. Credit certainly goes to Howard, as well, for his economical directing style, which puts the focus on the characters and keeps it there. But even his approach is ultimately in service to the Kasdans’ script.

The franchise is about to enter a new era, with Abrams wrapping up the Skywalker saga, and new trilogies from Johnson and Game of Thrones showrunners David Benioff and D.B. Weiss in development. A live-action series from Jon Favreau is on the way, and there are undoubtedly more sequels and standalone films in the pipeline that have yet to be announced. This fictional universe will continue to expand, and it must change and evolve to incorporate an ever-growing number of strong creative voices. But Solo: A Star Wars Story is classic Star Wars, and if it ends up being the last time Lawrence Kasdan writes a movie in this universe, it’s one incredibly entertaining, instructive swan song.

Solo: A Star Wars Story opens on May 25th.