The end of a television show is the time its writers have the most creative freedom. Long-running series thrive on a status quo—that everyone on Mad Men will work at the same ad agency, that the friends of Friends will live across the hall from each other—that is only ever in doubt when the end is near. Series finales give shows the freedom to go nuts, whether that means killing off most of the main cast (like The Sopranos, which set up its intentional whimper of an ending with several episodes of thunder) or completely changing format (like Angel, which turned its characters from struggling private investigators into uncomfortable corporate bigwigs). Parks and Recreation, which ends tomorrow night after seven seasons and 125 episodes, has brilliantly used that leeway to examine what it means for a sitcom to end.

After a two-season-long coast marked by cast departures and network shenanigans, the show is going out roaring, with maybe the best run of episodes in the show’s history. These 13 episodes are better than they had any right to be—they're why the term "victory lap" was invented—but how? Partly, Parks is just really good at endings. It’s hung on through several renewal cycles, forcing the writers to come up with just as many potential conclusions; that's how we got Leslie winning her city council race, as well as her wedding to Ben. So it’s unsurprising that with a whole season to wind things down, Parks has been able to put enormously satisfying buttons on many of its long-running plots, from April’s listlessness to Tom’s relationship woes.

But that very skill created some difficulty—Parks is a deeply optimistic show (one of its chief selling points), meaning each happy ending had to escalate in happiness, from the Harvest Festival to Leslie’s election to her romantic conclusion with Ben. How could co-creators Greg Daniels and Mike Schur keep topping themselves for sheer bliss and contentment? And how could the show keep its characters together when their trajectories would inevitably take them away from the small town of Pawnee? At the height of everyone’s success—Leslie taking a job at the National Park Service, Tom opening his own restaurant, Andy finding his calling as children’s entertainer Johnny Karate—Season 7 solved that problem by jumping two years into the future.

PARKS AND RECREATION -- "Save JJ's" Episode 707 -- Pictured: Chris Pratt as Andy Dwyer -- (Photo by: Colleen Hayes/NBC) Colleen Hayes/NBC

In 2017, the former Parks Department employees have grown out of being a sitcom cast into, as Ron Swanson puts it, "independent people who have moved on to better things." Tom is busy running his businesses. Leslie and Ben are overworked by their jobs and terrifying triplets. Ron has left the public sector to run a contracting firm. These characters can’t ride off into the sunset—at least not in the way they’ve been together over the rest of the series, on the ghost of a miniature horse. April spends the season trying to figure out what she wants to do with herself next, because being in government was always Leslie’s dream, and she (and the rest of the cast) were mostly along for the ride.

There’s a level of tension built into any long-running sitcom. The structure of the show means that we want to see the characters get what they want (because, unless it’s something like Seinfeld or It’s Always Sunny, the show works by making us want to hang out with them every week), but it also means that writerly contrivances are necessary to keep them together. Parks and Rec’s final season has staked out that paradox as a playspace: The writers plotted their escape by (deep breath) skipping ahead to its cast coming together again after drifting apart, essentially restarting the show by getting the gang back together in opposition to a common enemy (the overreaching tech company Gryzzl). The best episode of the season (and possibly the series), "Leslie And Ron," forces the titular characters to confront the passage of time head-on, something that’s simultaneously deeply sad and very exciting.

PARKS AND RECREATION – "Funkin' Gonuts" Episode 704 – Pictured: (l-r) Nick Offerman as Ron Swanson, Amy Poehler as Leslie Knope – (Photo by: Tyler Golden/NBC) Tyler Golden/NBC

That’s in sharp contrast to the last sitcom that tried something this self-reflexive: the final season of How I Met Your Mother, which pulled a similar temporal trick in the opposite direction, setting its first 22 episodes in one weekend before skipping through decades in its series finale. "Last Forever" attempted to skip through Ted, Robin, Barney, Marshall, and Lily’s futures, revealing that the afterword is just...life. Pushing back against the idea that a TV romance ends in stasis is noble, but the cynicism of the finale, particularly in the way it cast aside Barney and Robin and Ted and Tracy’s weddings, just left audiences flat. Sure, sometimes the happy ending doesn’t stick, but showing that doesn’t have to entail giving audiences the finger.

HIMYM spent its final season (and, in a sense, the entire series) building toward two weddings. But both of those relationships were shams. Parks and Rec, a series that has perfected the art of the sitcom wedding, had its lowest-key nuptials as its last in "Donna and Joe." Partially, that’s because Donna isn’t as crucial of a character as April and Andy or Ben and Leslie, but it’s also because the framing of the season acknowledges that the wedding is, in some sense, unimportant. It’s the culmination of Donna and Joe’s relationship, but that’s a given—-they’ve already made the commitment, so we can skip through the ceremony and head straight to Donna’s brother Levondrious (Questlove) making trouble, because it’s funnier.

Big events in characters’ lives and the sitcoms that portray them are attempts to capture everything in amber—a birth or a death or a wedding means that everything will be different forever, in a better way. But the emotional crux of "Donna and Joe" is Ben’s decision to run for Congress, a career move that sends his life in a new direction, off to bigger and better things, with the support of everyone who loves him. And the emotional climax of the series is Ron and Leslie renewing their friendship, consciously agreeing to work on a relationship rather than allowing time to drag them apart.

PARKS AND RECREATION -- "Pie-mary" Episode 708 -- Pictured: (l-r) Amy Poehler as Leslie Knope, Adam Scott as Ben Wyatt -- (Photo by: Ben Cohen/NBC) Ben Cohen/NBC

That’s what this last season of Parks and Rec has realized—it’s a celebration of beginnings in addition to endings, of the idea that there are always possibilities, even if those end up leading you back to the same people (kind of like a wedding!). The cast could wind up like Ethel Beavers, regretting never telling Bill Murray’s Mayor Gunderson how she felt, but the show’s optimism hinges on its faith that they won’t. All the show needed to end on a high note was to allow all of its characters the chance to renew their vows.

WIRED extends condolences to the colleagues, friends, and family of Harris Wittels, an executive producer, writer, and performer on Parks and Recreation who tragically passed away last week.**