Kerry Washington’s Rayshelle Payton proved a perfect replacement for Ms. Krabappel on Bleeding Gums Murphy/Dr. Hibbert paradox, where two brothers ended up voiced by the same actor.

However, one problem that The Simpsons has seldom encountered is the need to replace a character wholesale. While original voice actor Ron Taylor’s Bleeding Gums Murphy was able to be replaced with Kevin Michael Richardson, this was in large part possible because the character was a minor figure who rarely appears on The Simpsons. Bart’s teacher Ms. Krabappel, in contrast, plays a much bigger ing role on The Simpsons, meaning the show has struggled to find her replacement ever since original voice actor Marcia Wallace’s death in 2013.

Related: The Simpsons Bleeding Gums Recasting Creates A Weird Springfield Paradox

While there is no shortage of impressive celebrity guests who are willing to appear on the long-running series (as evidenced by Billie Eilish’s The Simpsons cameo), replacing a character as iconic as Ms. Krabappel requires more than a big name alone. As such, it was a  pleasant surprise to see that Kerry Washington’s Rayshelle Payton proved a perfect replacement for her in “My Octopus and a Teacher” (season 33, episode 18). The switch mainly worked because Washington’s cheery, idealistic character wasn’t an attempt to replace like with like. Washington’s character being a sweet, optimistic breath of fresh air for Springfield Elementary was a welcome change of pace for the often formulaic series, and proved that The Simpsons wasn’t trying to paper over Krabappel’s absence.

The Simpsons how Edna Krabappel was written out

Even back in classic, early-season Simpsons episodes, Lisa’s teacher Ms. Hoover was always similar to Ms. Krabappel, between her apathy, her cynicism, and her hands-off approach to teaching. As a result of this, another teacher character who fit this bill would have felt derivative and superfluous. Not only that, but no one could recreate Marcia Wallace’s iconic vocal performance as Ms. Krabappel, and the character appeared frequently enough that attempting to simply never mention Bart’s new teacher would have stood out as a strange storytelling choice.

With these factors in mind, the choice to make Washington’s character the polar opposite of Krabappel — a young, hopeful, and starry-eyed educator who tried her best to help troubled kids — allowed Simpsons viewers to see a new side of Bart and to see how Springfield Elementary would handle a teacher who liked their job and wanted to impart knowledge to kids. While Washington’s well-earned high profile made this another Simpsons celebrity cameo, the problem that the show has with showing off big-name actors and not giving them an interesting character was nowhere to be found. Thus, despite the odds, The Simpsons managed to replace Ms. Krabappel in a way that felt fresh, original, and respectful to the original character and her late actor.

More: The Simpsons' Netflix Spoof Completely Fudged The Punch Line