The major headline to come out of next month’s Season 4 premiere of the PBS series Finding Your Roots was revealed weeks ago: Bernie Sanders and Larry David are distant cousins. But there is a lot more where that came from.

In the episode, which will air on Oct. 3, Dr. Henry Louis Gates Jr. traces the ancestral history of both the Vermont senator and the Curb Your Enthusiasm creator and star who so brilliantly impersonated him on Saturday Night Live.

The first half of the show is largely dedicated to horrific revelations about how many of their not-so-distant ancestors perished in the Holocaust. David’s maternal grandfather was one of 10 siblings living in Poland in the late-1930s and the only one to flee to America.

“These little things that happen every day in our lives, little decisions, affect everything,” David says, becoming momentarily speechless before lamenting the fact that his parents never told him about his family’s history. “It would have been nice if they had told somebody about that decision and if it was passed on in family lore. But there is no family lore.”

Learning about the pogroms his family faced in the Galicia region of Eastern Europe, Sanders gets emotional thinking of the social implications. “What gets you here, as ugly and horrible as war is, that’s kind of organized, an army comes in. This is by local villages. This is by the person living across the street from you,” he says. “So my father grew up in a community where you did not know who you could trust.”

But perhaps the most bizarre discoveries come late in the episode when Gates shifts to the paternal side of David’s family, nearly all of whom came from Hesse-Darmstadt, once an independent state within what is now modern-day Germany. “I’m a German boy,” David jokes.

Almost all of those ancestors settled in New York City, where David was born in 1947, with one major exception. The comedian was baffled to learn that his great-grandmother Henrietta was born in Mobile, Alabama. “What?!” he asks over and over. “I’m a little more exotic than I thought I was,” he says. “Is Alabama exotic? I don’t know. Germany’s exotic? I’ve got probably some of the most racist places in the world connected.”

Even more shocking was the fact that Henrietta’s father, David’s great-great-grandfather, Henry Bernstein, was one of only about 3,000 Jewish men to fight on the side of the Confederacy. “Are you telling me that my great-great-grandfather fought for the South in the Civil War?” David asks. “What?! Are you kidding?! That is mind-blowing to me, I can’t believe it.

“This is just such an odd combination on my father’s side of Germany and the South,” he adds. “Two places that we have fought against as a country. Oh my goodness, I hope no slaves show up on this.” At that point, Gates instructs him to turn the page. “You did it! I knew it!” David shouts. “Unbelievable. Oh boy, oh boy.”

The two slaves listed on the document Gates’ researchers found are labeled “mulatto,” a term that was ironically featured prominently in a Season 4 episode of Curb Your Enthusiasm called “The Surrogate.” In that episode, Larry buys a mixed race doll as a present for a friend’s baby shower and offends the guests when he says, “It’s a mulatto.” As they stare at him in disbelief for using such an outdated and offensive word, he asks, “No good?”

“Oh, professor, I’m so sorry,” David jokes to Gates after discovering his family’s shameful past. “You can see why my father didn’t want to tell me anything about his family. Holy cow.” He then adds, “Well, Henry Bernstein, I hope you’re proud of yourself.”

As revelatory as David’s Southern history is, it is still the joint realization that he and Bernie Sanders are related that provides Finding Your Roots its most climactic ending yet. Each man takes a DNA test and finds out separately that they are a genetic match with someone else who has appeared on the show.

“I hope it’s a good athlete,” David says before turning the page and seeing Sanders’ face. “What the hell!” he exclaims. “That is really funny, that is amazing. Alright, cousin Bernie.

“You’re kidding!” Sanders says before bursting into laughter and adding, “This is unbelievable.”

The senator has always said of David, “He does a better Bernie Sanders than I do.” Now he knows why.