Last month, the NBC sitcom The Good Place returned for its second year after a first season that was widely praised as “surreal and high-concept” and “ambitious and uniquely satisfying.” In the two-part pilot, the show introduced a woman named Eleanor (Kristen Bell) who dies and finds herself in a non-denominational heaven by mistake—and who decides to learn how to become a better person in order to earn her spot in the afterlife. With that premise, The Good Place revealed what would eventually become the show’s most important theme: ethics. To avoid being sent to The Bad Place, Eleanor enlists her assigned “soul mate,” a former professor of moral philosophy named Chidi (William Jackson Harper), to teach her how to change her selfish ways.

Many TV critics have acknowledged the show’s unconventional embrace of ethics. But few have delved into what makes The Good Place’s depiction of the discipline so refreshing, yet effective, as both comedy and an informal educational tool. As a bioethicist who teaches a class on ethics and pop culture at Fordham University, I’ve integrated clips from the series into my lectures for a few reasons. While other shows have discussed moral principles, The Good Place stands out for dramatizing actual ethics classes onscreen, without watering down the concepts being described, and while still managing to be entertaining. By spending multiple episodes building on the subject, the sitcom offers a thoughtful and humorous survey of a wide range of concepts that rarely get explored before a mainstream audience.

Most episodes in Season 1 feature, at some point, Chidi rolling out a chalkboard. He breaks down complex ethical frameworks for Eleanor, gives her reading assignments about Immanuel Kant’s categorical imperative and Thomas Scanlon’s book on contractualism, What We Owe to Each Other, and encourages her to take the needs of others, instead of just her own, into account. Fortunately, the show has only grown more confident in Season 2. After the twist in the Season 1 finale—where Eleanor and Chidi find out they’re actually in a version of The Bad Place cleverly designed by the celestial architect, Michael (Ted Danson)—it seemed like the ethics lessons might wane, if not stop altogether.

In fact, the opposite happened, and Chidi finds himself with a new student: Michael, the immortal demon whose goal is to find creative ways to torture “bad” souls, but who claims he now wants to help his victims get into the real Good Place. The newest episode, which aired Thursday, may be the most revealing example yet of how The Good Place keeps deepening the way ethics gets portrayed in pop culture. Despite its emphasis on morality, The Good Place waited until its second year to even address the most famous, and perhaps overused, thought experiment in the field: the trolley problem.

* * *

You don’t have to be an ethicist to have heard of the following hypothetical conundrum: You’re riding a trolley that’s barreling toward five people on the tracks. Doing nothing will result in their deaths. Alternatively, you could pull a lever, diverting the vehicle to another set of tracks, killing one person instead of five. What do you do? As Lauren Cassani Davis wrote for The Atlantic in 2015, “Puzzling, ridiculous, and oddly irresistible, this imaginary scenario has profoundly shaped our understanding of right and wrong” over the last 40 years.

It’s no surprise the trolley problem has become a fixture in ethics intro classes. The experiment helps newcomers to the field examine two important ethical theories: utilitarianism (taking the action that results in the greatest amount of good for the largest number of people) and deontology (trying to do as much good as possible, though the actions you take to get there matter more than the actual results). But the trolley problem and its spinoffs work on a more intuitive level; they don’t require you to dig into more abstract concepts like what it actually means to do the “most good” or weighing “intrinsic versus instrumental” value.

Netflix is particularly fond of the trolley experiment, which was featured in the most recent seasons of two of its original shows this past summer. In the penultimate episode of Unbreakable Kimmy Schmidt’s third season, the protagonist Kimmy takes a college philosophy class, learns about the trolley problem, and becomes obsessed with utilitarianism. Similarly, in a Season 5 episode of Orange Is the New Black—not so subtly titled “Tied to the Tracks”—a character uses the trolley problem to explain the “classic deontological dilemma” of whether to sacrifice one woman for the greater good.

Where other shows’ direct discussion of ethics might begin and end with the trolley problem, The Good Place notably refrained from using this pedagogical crutch for the entire first season. After the finale aired, Maureen Ryan at Variety suggested that the show’s first 13 episodes comprise an extended exploration of the thought experiment. This may be an oversimplification of the series, but Ryan’s observation demonstrates how the dilemma has become virtually synonymous with ethics as a whole.

In Thursday’s episode, “The Trolley Problem,” The Good Place finally did tackle the famous scenario. As usual, Chidi is at a blackboard explaining the experiment to his students, citing the work of the philosopher Philippa Foot, along with a few variations. Less predictably, Michael later transports Eleanor and Chidi onto an actual trolley careening toward humans on the tracks to see how Chidi would react in real time. At another point, Michael takes the duo on a trip to an operating theater, where Chidi lives out the so-called “transplant thought experiment” (in which a doctor has to determine whether to kill one person—in this case, Eleanor—in order to use her organs to save the lives of five other people). Michael insists the aim of these simulations is to help him relate to humans’ ethical decision-making, but Eleanor realizes he’s just manipulating Chidi, finding new ways to torture him.

“The Trolley Problem” allows the experiment to surface in multiple forms, helpfully reinforcing the notion that there is, in fact, no single correct answer, and many ways of thinking through the question. The episode starts with the classroom scene, complete with a model trolley, before literalizing the experiment and making Chidi steer an actual trolley to hilariously bloody effect. But the episode references the problem in more subtle ways, too. In true Good Place fashion, a split-second visual gag during a real-trolley scene involves a movie marquee that reads “Strangers Under a Train” and “Bend It Like Bentham.” Eventually, Chidi is faced with another conflict: After learning Michael might not really care about ethics, Chidi realizes he’ll be tortured whatever decision he makes. He can continue to teach Michael and keep participating in distressing scenarios, or refuse and be sent to the real Bad Place. Chidi ultimately chooses to suffer at Michael’s hand rather than select that outcome himself—essentially deciding not to take action and pull the metaphorical trolley lever.

While the trolley experiment isn’t novel or inherently funny, it would be unthinkable for a show like The Good Place to ignore it completely. So the episode opts to squeeze the basics of the dilemma into a two-minute cold open padded with some jokes about Michael’s total lack of humanity (by way of a solution, he proposes an elaborate method to kill everyone on the tracks). In fact, “The Trolley Problem” gets plenty of comedic mileage out of Michael’s obtuseness. In an assigned essay about the ethics of Les Misérables, Michael rambles about how everyone in the novel is terrible, and that he knows Victor Hugo ends up in The Bad Place, like most French people do. With Michael playing the role of a more depraved Eleanor from Season 1, Chidi doubles down on his beleaguered, nerdy professor persona, forcing Michael to repeatedly scrawl “People=Good,” Bart Simpson-style, on the chalkboard. Early on, Eleanor mocks Chidi for writing a Hamilton-esque rap musical about the Danish philosopher Søren Kierkegaard to teach in class (“My name is Kierkegaard, and my writing is impeccable / check out my teleological suspension of the ethical”).

Much of what makes The Good Place’s lessons so realistic is the interplay between a completely inexperienced student and a teacher who has devoted his life to the discipline. Chidi attempts to break down difficult concepts into morsels Eleanor and her classmates can wrap their heads around, prompting responses the audience may find relatable. The show’s creator, Michael Schur, told me he envisioned Eleanor as a stand-in for viewers, who can process these new ideas alongside her. Schur even drew on his own experience when crafting Eleanor’s initial reaction to learning about utilitarianism in Season 1. She’s immediately satisfied by the approach, questioning why anyone would bother with the other theories—something my students tend to think as well.

A sitcom may seem like an unlikely vehicle for serious discussions about moral philosophy, which viewers might expect to find in medical and legal dramas (albeit in less literal, didactic forms). But the subject and medium are surprisingly compatible. A comedy can broach otherwise tedious-sounding ideas with levity and self-awareness, and has more leeway to use contrived or exaggerated scenarios to bring concepts to life (like showing Chidi’s terror at repeatedly allowing the trolley to kill someone on the tracks, spraying their blood in his face and mouth). In The Good Place, the classroom scenes are not there to be preachy; they’re plot devices, sandwiched between jokes. When Chidi is discussing Aristotle in Season 1, Eleanor asks facetiously, “Who died and left Aristotle in charge of ethics?” “Plato!” a frustrated Chidi yells, pointing to the philosophy family tree on the board behind him.

There are practical upsides to a well-crafted, ethically curious show like The Good Place being on network TV. As The Atlantic’s Julie Beck pointed out last December, morality has become a justification fueling seemingly intractable divides between groups—a dynamic that’s especially visible in today’s polarized American political climate. Part of the appeal of “ethics classroom” episodes may be that people are interested in getting back to basics, to try and figure out how others think and reach decisions that may be very different from their own.

In this light, bringing digestible ethics lessons to the masses can be seen as a moral act, ensuring that those who don’t spend hours poring over Kant and Judith Jarvis Thomson are also privy to what’s gained from understanding how people think. If consuming the works of moral philosophers were the key to living a good life, “then the only nice, thoughtful people would be these hermitic, obsessive readers,” The Good Place’s Kristen Bell told me. “We can’t have that—we have to make it accessible. If you’re making people laugh while you’re teaching them, it’s the best way to do it.”

Indeed, The Good Place’s focus on ethics wouldn’t mean as much if it weren’t also remarkable in other ways—the performances, the top-notch writing, the wordplay and pun-laden jokes, the willingness to formally experiment with the sitcom genre. “I don’t expect or necessarily even believe that the average person is as interested in [ethics] as I am,” Schur told me. “While we’re discussing the issues that I want to discuss, I also know that I have a responsibility to the audience to tell a story. The goal is not to change the world; the goal of this is to make a high-quality, entertaining show that has good-quality acting.” On that front, Season 2 has certainly succeeded—but Schur still promised I’ll have plenty of new clips to show my students this semester.