Matilda, Roald Dahl’s 27th published book and one of his last for children, was released in 1988 to near universal acclaim. The novel broke sales records by moving more than a half a million copies in six months and went on to win the Children’s Book Award. But how much do you really know about Matilda and its delightfully precocious heroine?

1. Dahl had to write Matilda twice.

It took Dahl at least two years to write and rewrite Matilda. In 1988, the year the book was published, he told interviewer Todd McCormack, “I got it wrong. I’d spent six or eight or nine months writing it and right when I’d finished, it wasn’t right ... it just wasn’t right … I started the whole book again and rewrote every word.” He added, “Now I'm fairly happy with it. I think it’s OK, but it certainly wasn’t before.”

2. The subject was dear to Dahl.

In an interview with NPR’s All Things Considered in November 2013, Roald Dahl’s daughter Lucy explained that her father’s novel was, in part, about his love for books: “Matilda was one of the most difficult books for him to write. I think that there was a deep genuine fear within his heart that books were going to go away and he wanted to write about it.”

3. Matilda nearly died.

And not at the hands of Miss Trunchbull. In an earlier version of the book, Dahl killed off his rebellious, unruly heroine at the end of the book. That incarnation of Matilda was a terrible little girl who was always playing tricks on people and used her powers to help her teacher fix a horse race. In the end, she dies. Looks like all that rewriting was for the best.

4. Matilda was written in a garden.

Dahl famously wrote most of his works from a small, cozy hut in his garden. He worked in pencil on yellow legal notepaper while sitting in his mother’s old armchair with a specially made desktop across his lap. Lucy Dahl’s description of her father’s writing process is enchanting:

His hut was a sacred place. ... We were all allowed to go in there, but we only disturbed him when we absolutely needed to because he used to say that his hut was his nest. You would walk in and the smells were so familiar — that very old paper from filing cabinets. And he sat in his mother's old armchair and then put his feet up on an old leather trunk, and then on top of that he would get into an old down sleeping bag that he would put his legs into to keep him warm.… He always had six pencils with an electric sharpener that he would sharpen at the beginning of each session. His work sessions were very strict—he worked from 10 until 12 every day and then again from 3 until 5 every day.

5. You can visit Dahl’s hut.

The recreated hut is now on display at the Roald Dahl Museum and Storytelling Centre in Great Missenden, the village in Buckinghamshire, England where Dahl wrote most of his books. Dahl moved there from New York City in 1954 with his first wife, actress Patricia Neal, and lived there until his death 36 years later in 1990.

6. The library Matilda frequents is a real place.

Matilda, like most brilliant children, is a great reader. Her family of TV-watching halfwits finds this passion both disgusting and upsetting, so when her mother is off playing bingo in Aylesbury, Matilda—four years and three months old—walks herself down to the town library, where she can spend "two glorious hours sitting quietly by herself in a cosy corner devouring one book after another."

The library Dahl had in mind is an actual place, on the High Street in Great Missenden, just down the street from the Roald Dahl Museum. The first book for adults that young Matilda reads is Great Expectations, but her list, her horizons, and her vocabulary soon expand: Brighton Rock by Graham Greene, The Sound and the Fury by William Faulkner, Tess of the D’Urbervilles by Thomas Hardy, and many more that are more often found on college reading lists.

7. Matilda has ventured through mailboxes.

You’re probably already familiar with Matilda’s celebrated musical adaptation and the 1996 film version starring Mara Wilson. What you might not know is that Matilda and the Queen of England have something in common: In 2012, Royal Mail issued a set of six stamps featuring Quentin Blake’s iconic illustrations from Dahl’s books; Matilda was seen on the 76p stamp.