We dimmed the lights. In our pajamas, we huddled together under a blanket. The annual television broadcast of The Wizard of Oz was a national ritual when we baby boomers were kids. It would be years before I saw the Technicolor land of Oz bloom outside Dorothy’s black-and-white farmhouse, as we didn’t have a color TV. Years, too, before I would come up with the idea for a novel, Wicked, which inspired the Broadway musical.

Thanks to MGM’s 1939 film, Dorothy’s adventure in Oz has become a foundation myth of American culture. On a recent afternoon in my study, I pored over a photocopy of a touchstone memento from the film—a typewritten studio script. The original, in the collections of the National Museum of American History and dated May 4, 1938, consists of about 100 pages. Though other writers, including lyricist E. Y. Harburg, who penned “Over the Rainbow,” would refine and polish the story, this draft is the work of Noel Langley. He based the script on L. Frank Baum’s 1900 novel for children, The Wonderful Wizard of Oz.

Langley, South African-born, was selected as the screenwriter because of his whimsical 1937 children’s book, The Tale of the Land of Green Ginger. Langley’s fantasy features the Emperor Aladdin, an ordinary fellow presiding over an enchanted realm. In the first chapter, Aladdin informs his courtiers, “You may dispense with the rising and bowing at the mention of my name, or we’ll never finish.” Echoes of Green Ginger are visible in the script: About halfway through, for example, Langley introduces a parlormaid, Lizzie Smithers, who warns the Wizard against returning a bow too often—or he’ll never complete the exercise. Langley, the producers clearly felt, would bring to the Depression-era project a keen awareness of adult pomposity as well as a child’s capacity to feel loss and longing.

The differences between this version and the final shooting script? Hardly a page escapes without crossed-out speeches and handwritten substitutions. Plot points abound that are later abandoned (the Wicked Witch of the West has a son named Bulbo?). Only a couple of scenes refer to singing, and none of the famous lyrics appear. What would become “Over the Rainbow,” which I call America’s unofficial national anthem, is referred to as “the Kansas song.”

What this draft achieves is the compression of choice elements from a best-selling, although rambling, children’s book. In the original novel, the Wicked Witch of the West dies on Page 155, but Dorothy doesn’t leave Oz until 100 pages on. If Langley stuffs in extraneous characters for ballast (a Kansas farmhand and his sweetheart among them), he also abbreviates the trajectory of the story so that the demise of the Wicked Witch of the West kick-starts Dorothy’s return to Kansas.

The American author-illustrator Maurice Sendak believed that The Wizard of Oz film was a rare example of a movie that improves on the original book. I agree with him. Langley consolidates two good witches into one. He eliminates distracting sequences involving populations Dorothy encounters after the Wizard has left in his balloon—the china people (porcelain figures) and the Hammer-Heads (a hard-noggined race).

At a conference, I once chatted on stage with Sir Salman Rushdie. We discovered that, as kids, we both began to write under the influence of the Technicolor light of Oz. Indeed, Rushdie had published an essay on the film just as I was writing a first draft of Wicked. The film’s only misstep, Rushdie told me, was the ending. In the book, Dorothy’s journey is real, but in Langley’s script, she has merely experienced a wild dream.

I agreed that the ending might constitute a cop-out—but there is one way that Langley’s invention suits the story. All the way through the film, Dorothy encounters charlatans and liars. The Wizard has no magic powers. Glinda the Good Witch waits until Dorothy has narrowly averted mortal danger before she reveals the secret of the ruby slippers. The Wicked Witch of the West, bless her little green heart, is the only adult figure who tells the truth. (We must eliminate from this lineup the Scarecrow, the Tin Man and the Cowardly Lion, because as individuals lacking a full complement of their adult powers, they perform the function of childhood friends, not grown-ups in charge.)

When Dorothy wakes up in the film’s final sequence, and the adults dismiss her insistence that she actually had traveled to Oz, we—the audience—realize that adults are so accustomed to lying to protect the young that they can’t recognize the truth when it is spoken. In this way, Langley, like Baum, celebrates the hearts of the young as more innocent and honest than those of their wizened elders.

But we children in the audience know that Dorothy went to Oz. We have faith. The Wizard may have had no power of magic, but the story does. We’ve been on a journey that none of us can ever forget. This typescript has brought us halfway there. A year before the film’s premiere, this draft has promise every step of the way. Sure we’ve come to identify that promise with a rainbow featured in a song that wasn’t yet written. But the promise was there from the very start.