Beth is able to see a chessboard and chess pieces on the ceiling during The Queen’s Gambit, usually while intoxicated; however, the prodigy is able to visualize the game during the miniseries’ climactic match against Grandmaster Vasily Borgov in Russia, despite being sober. This event may puzzle some viewers, as the previous scenes had suggested Beth was hallucinating from, essentially, a drug trip. The final match thus sheds light on earlier moments in The Queen’s Gambit, as it suggests another explanation for what Beth was really “seeing.”

The ending of The Queen’s Gambit challenges convention: it shows Beth being triumphant over her rival, but only after she is able to overcome her addictions and self-doubt. In doing so, The Queen’s Gambit subverts expectations; Beth is not some tortured, tragic genius doomed to live a short life of misery and substance abuse. Rather, she’s a young woman in charge of her own destiny.

Related: The Queen’s Gambit In Real Life: The World’s Best Female Chess Players

A pivotal moment in Beth’s journey is her realization that her fears about being crazy are just that — fears. She makes the decision to pursue her career-defining match against Borgov in Russia free of obligations, compromises, and insecurities. Adopting a newly sober and responsible lifestyle, Beth successfully thwarts Russian attempts to set her up in The Queen’s Gambit‘s final episode. When she finds herself struggling against Borgov, she uses her ability to visualize various strategies on the ceiling — indicating that this was something she was capable of doing all along, but was only able to under the calming influence of tranquilizers.

The pills Beth takes in The Queen’s Gambit are a fictional tranquilizer called “xanzolam” that is based off the real life benzodiazepine Librium (closely-related to the more commonly known Valium). Although hallucinations are a possible side effect of this family of psychoactive drugs, they are primarily taken as mood suppressors that help treat things like anxiety. When Beth takes them as a child, it allows her to “see” a giant chessboard on the ceiling above her. She’s not really seeing it though — she’s imagining it. The tranquilizers simply allowed her to calm her mind down enough to concentrate on remembering the game.

Beth is thus able to visualize her match in the final episode of The Queen’s Gambit because she has grown enough as a person to be able to calm herself. The moment serves as a symbolic representation of her quieting the voices of self-doubt in her mind and tuning out all outside distractions in order to fully concentrate on the match in front of her. The moment indicates that Beth is truly victorious — not just in achieving her goal of becoming the next Grandmaster, but more importantly, she’s defeated her personal demons that have been plaguing her since childhood.

Next: The Queen’s Gambit Challenges How Much You Really Know Chess