Halfway through Netflix’s buzzy new show Russian Doll, Natasha Lyonne’s character Nadia pauses to deliver a speech in praise of Emily of New Moon, the lesser-known novel by Anne of Green Gables author L.M. Montgomery. “Everybody loves Anne,” Nadia says. “But I like Emily. She’s dark.”

Russian Doll is a show filled with Easter eggs, a show that in fact features Nadia smirking over the Easter eggs she inserts into her own video game designs. And the Emily of New Moon Easter egg is heavily spotlighted.

Spoilers follow for Emily of New Moon and the first season of Russian Doll.

The first time Nadia mentions Emily, her protégé Alan — who like Nadia finds himself repeatedly living through the same night — gasps in pleased recognition and says, “I love that book.” Nadia dies multiple times breaking into her guardian Ruth’s place to search for her copy of the book. Once she has it, in season one’s penultimate episode, she hands it solemnly over to Lucy, the daughter of her ex John, saying, “It’s not really a present, it’s more like something that we share. … Emily is the hero,” before collapsing into a choking fit, coughing up a broken shard of mirror, and dying.

Emily of New Moon is built into the structure of Russian Doll in a fundamental way, one that seems to be personal to not only Nadia but also to Alan and Lucy. It’s an Easter egg that feels vital to understanding who Russian Doll’s characters are and what’s important to them.

So: What’s Emily of New Moon, and why does it matter?

When Nadia says Emily of New Moon is darker than Anne of Green Gables, she’s not wrong

Emily of New Moon is in many ways a close cousin to the more famous Anne of Green Gables. Like Anne Shirley, Emily Starr is an imaginative weirdo whose childhood best friend is her own reflection in a mirror — this choice of companion is a choice born more of loneliness than narcissism; both Anne and Emily think of their reflections as separate people — and who is prone to anthropomorphizing the world around her with lavish descriptive titles. One of Emily’s favorite fantasies is that of the “Wind Woman,” a personification of the wind who she hears blowing around her all the time and considers to be a close personal friend.

And like Anne, Emily finds herself orphaned at the beginning of her first book and is subsequently sent off to live in a charmingly old-fashioned farmhouse outside a charmingly old-fashioned small village (the “New Moon” of the title is New Moon Farm, where Emily goes to live with her aunts). Like Anne, Emily is at first unwanted — her relatives choose which one of them will take care of her by drawing lots — and like Anne, she finds that one of her new guardians is sweet and kind, while the other is an unmarried older lady who appears to be forbiddingly stern. And like Anne, Emily gradually wears down the stern guardian down she gives in and admits that she loves her odd and endearing young charge.

But where Anne is a lovable puppy dog of a character, eager to please and to be pleased and willing to find her own flights of fancy funny with hindsight, Emily is cooler, more serious, and more restrained.

When the girls at her new school bully her, Emily stares them down and demands to know why they don’t like her. “Because you ain’t a bit like us,” one of them explains, in response to which Emily delivers this viciously sick burn: “I wouldn’t want to be.”

And when Emily’s stern guardian — cold Aunt Elizabeth — threatens to cut Emily’s hair, Emily stares her down so condescendingly that Aunt Elizabeth is transported back to her own childhood:

“Aunt Elizabeth,” she said, looking straight at the lady with the scissors, “my hair is not going to be cut off. Let me hear no more of this.” An amazing thing happened to Aunt Elizabeth. She turned pale — she laid the scissors down — she looked aghast for one moment at the transformed or possessed child before her — and then for the first time in her life Elizabeth Murray turned tail and fled — literally fled — to the kitchen. “What is the matter, Elizabeth?” cried Laura, coming in from the cook-house. “I saw — Father — looking from her face,” gasped Elizabeth, trembling. “And she said, ‘Let me hear no more of this’ — just as he always said it — his very words.”

As far as beloved heroines of early 20th-century Canadian children’s literature go, Emily Starr will cut a bitch.

Which is lucky for Emily, because the world she lives in requires such grit and mental fortitude. Anne Shirley’s world is immensely sweet and pastoral, but Emily’s is gothic. Her love interest, Teddy, has a mother so controlling that she poisons Teddy’s pets because she’s afraid that Teddy will love them more than he loves her. Her best friend, Ilse, is neglected by her father, who decided when Ilse was a baby that he would never again show affection to any woman, including his daughter, after his wife left him.

Emily’s friendships are all fraught with romantic or psychosexual rivalry, and at one point in the third volume of her series, her dead father’s college best friend/her suitor who is 24 years older than her (!) tells her that the book she wrote is bad, and she is so distressed by the news that in her confusion she accidentally falls on some scissors (!!) and gets blood poisoning as a result (!!!), which somehow convinces her that she should marry the old dude (!!!!), before eventually he reveals to her that her book was good all along so she doesn’t actually have to marry him.

The whole thing is just a little twistier, a little more messed up, than the Anne books are. Emily is Anne run through a goth filter.

But it’s not quite as messed up as Russian Doll is. And that’s the appeal.

Emily’s tragic backstory gives Nadia a way to process her own trauma

Nadia’s backstory has close parallels to Emily’s backstory. Both girls lose their parents young and are packed off to live with someone else. Emily even comes close to living with an Aunt Ruth, which would have matched her exactly to Nadia’s godmother Ruth (although Emily’s Ruth is cruel and petty, as opposed to Nadia’s Ruth, who is warm and kind).

And Emily handles her orphanhood and transition to a new place with the kind of sardonic restraint that would have appealed to Nadia. Anne Shirley begs her guardian to let her stay at Green Gables, but Emily, made of tougher stuff, says only, “I know it was very good of you to bring me to New Moon, Aunt Elizabeth.” Then she shocks Aunt Elizabeth deeply by noting that “God is good and the devil might be worse.”

But there’s one big difference between Nadia’s story and Emily’s that would have also appealed to Nadia hugely. Nadia blames herself for losing her mother. She believes she said something that made a social worker take her away from her mother, and that their separation is what led to her mother’s death, and that thus she committed an unforgivable betrayal. When she talks about her mother, she consistently has a hard time figuring out if her life with her mother was “really that bad.”

Emily does not have to deal with any such ambiguity. Emily’s father is perfect to her, and Emily loves him. When he dies, it’s as well-planned-out a death as anyone could wish for. He tells her two weeks before his death that he doesn’t have much longer to live, and then they discuss exactly what his death will mean for Emily. Later, Emily describes the last two weeks of her father’s life as “beautiful weeks — beautiful and not sad.”

All of which means that Emily gets the badass attitude and the tragic backstory that would have made someone like Nadia relate to her, but she doesn’t have to deal with the feelings of guilt and shame that Nadia has to deal with. Emily’s story is Nadia’s story rendered poetic and aspirational.

More broadly, Emily’s story is a story about family trauma, with the worst parts ironed out. It is about someone surviving trauma and becoming stronger and quippier and more heroic for it, and not having to deal with the parts of the story that climb under your skin and warp your psyche the way that Nadia and Alan are warped, the way Nadia thinks Lucy will be warped after her parents’ divorce, until only an endless loop of dying over and over again will teach you how to be a better person.

Emily offers Nadia an avatar for herself, a way to think through what happened to her without it hurting too much. Which is why it’s only when Nadia fully embraces the idea of a heroic Emily in her meeting with Lucy that she is able to begin to let go of her guilt over what happened to her mother, and finally close the loop.

Emily is the hero. Which means that so is Alan, and so is Lucy. And so is Nadia.