It’s widely known that Stephen King was definitely not a fan of Stanley Kubrick’s 1980 adaptation of his 1977 novel The Shining; the legendary author has been quite vocal about his disdain for the film, which is nevertheless considered one of the greatest horror movies ever made. One could argue it’s been King’s most-disliked adaptation of his literary work.

That’s why it’s kind of amazing to learn that Mike Flanagan’s cinematic take on the novel’s 2013 sequel Doctor Sleep has won over the horror master himself.

In a recent interview with Entertainment Weekly, Flanagan revealed how he walked a tightrope between his love of the novel (he considers himself “a King fanatic”) and Kubrick’s epic cinematic style.

“[W]hen I read Doctor Sleep, all the images in my head were Kubrick‚Äôs images,” Flanagan said in the interview. He added that weaving together these very different versions of The Shining posed major challenges during the writing process.

Flanagan had already won praise from King for his well-received adaptation of Gerald’s Game (which most studios had considered unfilmable), but in the case of Doctor Sleep he faced a new and more daunting challenge: uniting Kubrick’s vision with King’s without disappointing the author, who told EW he read Flanagan’s script “very, very carefully.”

No doubt Flanagan was overjoyed to know that King considers his film to have repaired the elements the author considered broken in the 1980 film, uniting the imagery, music and timelines almost seamlessly. He even managed to reconcile the vastly different endings of King and Kubrick’s versions.

“Everything that I ever disliked about the Kubrick version of The Shining is redeemed for me here,” King revealed. “Mike took my material, he created a terrific story, people who have seen this movie flip for it, and I flipped for it, too.”