When Stephen King wrote the novel Doctor Sleep in 2013, he did a few very key things. He wanted to make sure it stood alone as a scary and effective story of trauma and recovery; he wanted to do justice to the legacy of one of his seminal novels, 1977’s The Shining; and perhaps most importantly, he wanted to make sure Doctor Sleep was a sequel to his version of The Shining. As in, not Stanley Kubrick’s. That’s why Mike Flanagan’s adaptation of Doctor Sleep, hitting theaters in November is all the more astounding. Flanagan aimed to adapt King’s novel, and be a sequel to Kubrick’s film. The trailer sure looks like he does it.

The task is nigh herculean; stuff happens in the movie The Shining that doesn’t happen in the book and therefore wasn’t written into Doctor Sleep. But the movie would need to have that. It’s all very confusing. At a trailer premiere event for the new film, writer-director Flanagan and producer Trevor Macy told a group of journalists—including yours truly—what on Earth is going on.

How DOCTOR SLEEP Brought King and Kubrick Together_1

“Yes, it is an adaptation of the novel Doctor Sleep,” explained Flanagan, “which is Stephen King’s sequel to his novel, The Shining. But this also exists very much in the same cinematic universe that Kubrick established in his adaptation of The Shining. And reconciling those three, at times very different, sources has been kind of the most challenging and thrilling part of this creatively for us.”

“First and foremost,” Macy joined, “the movie’s kind of its own thing. And has been embraced by the Kubrick estate and by King as such. But in a very real sense, we’re standing on the shoulders of literary and cinematic giants.”

Flanagan has already successfully adapted a King novel: the “unfilmable” Gerald’s Game, which Macy also produced; it’s one of the best King adaptations there is. So perhaps that gave them the benefit of the doubt with the author. But first they’d have to do it just right.

“When it came to trying to crack the adaptation,” Flanagan said, “I went back to the book [Doctor Sleep] first. And the big conversation that we had to have was about whether or not we could still do a faithful adaptation of the novel as King had laid it out, while inhabiting the universe that Kubrick had created. That was a conversation that we had to have with Stephen King to kick the whole thing off. And if that conversation hadn’t gone the way it went, we wouldn’t have done the film.”

I don’t think I can fully express just how much Stephen King hated the Stanley Kubrick adaptation of the film. Infamously, King thought it completely missed the point.

“Stephen King’s opinions about the Kubrick adaptation are famous and complicated,” Flanagan continued. “And complicated to the point that, if you’ve read [Doctor Sleep], you know that he actively and intentionally ignored kind of everything that Kubrick had changed about his novel and kind of defiantly said, ‘You know, nope, this exists completely outside of the Kubrick universe.'”

So for King to be okay with this new adaptation using Kubrick’s designs is truly remarkable. “We had to go to King and explain how certain characters who are alive in the novel, The Shining, and were not alive by the end of the film, how to deal with that.” Luckily for Flanagan, “our pitches to Stephen went over surprisingly well. And we came out of the conversation with not only his blessing to do what we ended up doing, but his encouragement.”

The filmmakers later said the two most nerve-wracking moments in their career were sending the initial draft of the script to King for approval and sending a finished cut of the film to King and the Kubrick estate. Both came back with positive endorsements. “That was always the hope going in,” the director shared with an enormous, beaming smile. “If there was some universe in which Stephen King and the Stanley Kubrick estate could both love this movie, that is the dream.”

And really, what bigger vote of confidence could anyone need?

Doctor Sleep comes to theaters on November 8.

Images: Warner Bros

Kyle Anderson is the Editor at Large for Nerdist. You can find his film and TV reviews here. Follow him on Twitter!