HBO’s Game of Thrones is a dense series with a huge weight of history behind its story. So in practically every episode, something happens that could use a little explanation. Every week, The Verge will dive into a scene or event from the latest episode of the series and explain how we got here. Whether you’re basically a Game of Thrones maester or you need a little reminder about previous events, we’ll try to help you keep your history straight.

We’re in the final stretch now for Game of Thrones, and this week’s episode underlined the point that’s been clear throughout the past eight seasons: it really is all about the throne — or, more specifically, who sits on it.

Spoilers ahead for Game of Thrones, in general, but especially season 8, episode 4, “The Last of the Starks.”

Who sits in the chair?

At one point in the season 8 Game of Thrones episode “The Last of the Starks,” Tyrion Lannister needles Varys, the Master of Whispers, about how many masters Varys has served in King’s Landing. “How many kings and queens have you served? Five? Six? I’ve lost count.” The gibe seems meant to suggest that Varys is disloyal at heart and should honor his commitment to Daenerys Targaryen, primarily to prove that he can be honorable. But his shifting position has much more to do with the tumultuous history of the Iron Throne. With possession of that throne up for grabs once again, it’s an apt time to look back on Varys’ years of service — and, more importantly, the five rulers he’s advised so far.

The Mad King

Any discussion of the recent kings of Westeros should begin and end with Aerys II Targaryen, aka the Mad King. The father of Rhaegar, Viserys, and Daenerys (and grandfather of Jon Snow, aka Aegon VI Targaryen), the Mad King is directly and indirectly responsible for nearly all of modern Westerosi history as we know it.

His excesses as king (and his instability due to Targaryen inbreeding) eventually led him to kill Ned Stark’s father, Rickard Stark, and Ned’s older brother Brandon. Those deaths led to Robert’s Rebellion, which would eventually see the other Great Houses of Westeros revolt against Aerys. Eventually, the Targaryen dynasty was overthrown. Aerys was killed by one of his own Kingsguard, Jaime Lannister (permanently branded “Kingslayer”) who was trying to stop him from obliterating King’s Landing with wildfire. Aerys’ surviving children, Viserys and Daenerys, were sent to Essos.

But even after Aerys’ death, the ramifications of his rule had serious consequences. Putting Dany in reach of the Dothraki changed the course of the history of Westeros, given that her marriage for political gain led to her gaining control of the powerful Dothraki army. Cersei later used the wildfire Aerys seeded throughout the city to obliterate her political enemies. And the power vacuum caused by his death was filled by Robert, setting the rest of Game of Thrones in motion.

As for Varys, he began his service working for Aerys. But typical for the Spider, his allegiance soon shifted to his successor — at least, on the surface.

“Gods, I was strong then”

Robert Baratheon was excellent at being a hero. He defended the realm, led armies to victory, and struck down crown prince Rhaegar Targaryen with a single blow of his war-hammer during the Battle of the Trident.

But he was terrible at being a king, as hard as Varys (and other members of his Small Council) tried to rectify that. Robert’s wife, Cersei Lannister, openly despised him, and their icy personal relationship led to no legitimate heirs — just Robert’s numerous bastards (including Gendry, whom Daenerys just legitimized as Robert’s son) and Cersei’s incestuous brood sired by her brother, Jaime. When Jon Arryn — Robert’s Hand of the King and lifelong mentor — was killed, it spelled the end of Robert’s reign, with calamity soon befalling both the new Hand, Ned Stark, and the realm at large.

The young lion

Next to sit the Iron Throne was Joffrey Baratheon, Jaime and Cersei’s eldest son. Living proof that the Targaryen ideals of incest were a bad idea, Joffrey was sadistic, amoral, spoiled, and power-hungry. Dismissive of both the common folk he was supposed to rule and any advisers he was supposed to listen to (including his own grandfather, Tywin), Joffrey had a short, brutish reign. It was a mercy for a lot of characters when he was killed at his wedding.

But Joffrey’s death revealed deeper machinations from Varys — who, it turns out, hadn’t been serving the Baratheon dynasty at all. Instead, he was still loyal to his original masters: House Targaryen. One thing that came of this: Varys sending Tyrion to safety with Daenerys to help him avoid being mistakenly punished for Joffrey’s death.

Ser Pounce’s king

After Joffrey, the Iron Throne passed to Tommen Baratheon, Joffrey’s younger brother. Where Joffrey was cruel, Tommen was kind, but his youth and easygoing nature made him easy prey for manipulation from his wife Margaery Tyrell, his mother Cersei, and the High Sparrow.

With such conflicting forces, it’s no wonder Tommen was an ineffectual king. And when Cersei destroyed the Great Sept and Margaery died, Tommen killed himself, unable to live without his queen — or, perhaps, unable to live with his mother’s horrific acts.

The Mad Queen?

At this point, Varys has had enough, and he joined his true queen, Daenerys Targaryen, to support her bid for the Iron Throne. But as this episode showed, his loyalty to her may not be ironclad — not if he sees Jon as both a better claimant to the throne and a better potential ruler. With Jon’s parentage out in the open, Varys even knows he can support Jon without betraying his attachment to House Targaryen. But he claims there’s a higher cause: “You know where my loyalty stands,” he tells Tyrion. “You know I will never betray the realm.”

But as Tyrion points out, serving “the realm” doesn’t necessarily mean loyalty to any particular figure in that realm. With only two episodes left and one throne to claim, a lot can still happen. But if history is anything to go by, whoever ends up on the Throne will probably have the Spider serving them — unless this latest piece of intrigue is the one that finally undoes him.