The U.S. version of The Office has solidified its place in history as one of the most beloved comedies ever to grace the television screen. Sure there were ups and downs throughout the show’s nine seasons—it’s not as pristine a run as, say, something like 30 Rock—but the good far outweighs the bad, and when the show was in its prime, it was great. Moreover, The Office‘s availability on Netflix has made it a consistently rewatchable sitcom years after it ended.

But as many fans know, The Office almost didn’t make it past one season. More than that, the show’s first season was something of a test balloon, with only six episodes ordered to see if a U.S. adaptation of the beloved U.K. series could work. And by many accounts, it didn’t. If you go back and watch the show from the beginning, Season 1 is very rough around the edges, and the series doesn’t really hit its stride until Season 2—which, not coincidentally, is one of the best seasons of comedy TV ever made.

So how did The Office make it through that rough patch—which included so-so reviews—in an era where TV ratings still mattered a great deal? Luckily, former The Office writer and creator/showrunner of Parks and Recreation and The Good Place Michael Schur has shed some light on this piece of TV history, with a hefty amount of insight.

Speaking with Vox’s Todd VanDerWerff as part of a fantastic longer interview, Schur offered a lengthy explanation for why The Office succeeded, and how those lessons learned have informed his approach to TV in the ensuing years:

The path [The Office] took was fascinating, and even though I was working on that show, I became a sort of student of the path of that show. And I remember tracking, internally, all of the things that went right with that show. There are so many, but I’ll give you three examples of things that went right for that show. Thing No. 1: That show was developed by Kevin Reilly, who was running NBC at the time. He had come from FX, and he loved the British show, and he was very passionate about The Office. So he gave [creator] Greg [Daniels] the chance to basically do it the way he wanted and basically cast it the way he wanted. He was very invested in the show. We made six episodes that first season, and no one liked it. [Laughs.] Ordinarily, 99 times out of 100, or maybe even 999 times out of 1,000, that show is canceled. It’s a six-episode experiment, and this is back, by the way, when sitcoms — when anything — could get big ratings on network TV. So that show is gonna get canceled. We all knew it was going to get canceled.

As Schur explains, even the vibe on set for the final episode of that first season was one of resignation to a presumed failure to find an audience:

There was a moment when we were shooting the last episode, where the cast was sort of huddled outside, and everyone was a little bit glum because it was our last week of shooting, and even though the show wouldn’t air for months, everyone kind of felt like, there’s no way this ever works. I remember Steve [Carell] looking around at the cast and saying, “Hey, we got to make six.” Like, “We got six of these things. That’s amazing. What a dream to make six episodes of this thing that’s so weird and pure.” So, definitely going to get canceled — except that Kevin Reilly kind of stakes his reputation as an executive [on it]. And says to his bosses at NBC, “I believe in this show. I think it can work. Please, please, please give me another chance. Give us another season.” They give him what was announced in the press as 13. It was not. It was six. We were given six more for season two, but they announced it was 13, because if they had announced it as six, everyone would have smelled blood and said, “Well, it’s doomed.” So that’s thing No. 1. A network executive does something which network executives are not known to do, which is stick his neck out.

The other big piece of the puzzle? The sudden superstardom of Steve Carell thanks to The 40-Year-Old Virgin: