Sen. Bernie Sanders (I-VT) defended people who voted for President Trump in a speech Friday, saying that the Democratic Party needs to better represent the working-class voters who supported his presidency.

“Some people think that the people who voted for Trump are racists and sexists and homophobes and deplorable folks. I don’t agree, because I’ve been there. Let me tell you something else some of you might not agree with, it wasn’t that Donald Trump won the election, it was that the Democratic Party lost the election,” Sanders said while speaking at an Our Revolution rally in Boston alongside Sen. Elizabeth Warren (D-MA), according to the Hill.

Sanders added that the Democratic Party needs to undergo a “fundamental restructuring” to win future elections and that the party’s current state pushed voters to support Trump and the GOP this past election season.

“We need a Democratic Party that is not a party of the liberal elite but of the working class of this country, we need a party that is a grassroots party, where candidates are talking to working people not spending their time raising money for the wealthy and the powerful,” Sanders said. “And when we do that, when we transform the Democratic Party, we transform America.”

Sanders said most people believe in a progressive agenda, not a conservative agenda, and encouraged voters to keep Warren in the Senate to fight for that progressive agenda.

Sanders has also criticized the Democratic Party for not doing enough to communicate with people in cities, towns, and rural America.

Sanders recently said he plans to introduce legislation that would push forward a single-payer healthcare system after the GOP healthcare bill failed to pass Congress.