President Barack Obama feels good about his policy legacy, and thinks more of it may survive the Trump presidency than most people expect.

But in an interview that aired Sunday on ABC’s “This Week,” the outgoing chief executive said he recognizes that the Democratic Party has lost a lot of power during his watch, and wishes he had done more to strengthen it.

“I take some responsibility on that,” Obama said.

The president was responding to a question from host George Stephanopoulos about the losses Democrats have suffered in Congress, where they have relinquished majorities in both parties, and in state legislatures, where they have lost more than 900 seats.

A big factor, Obama said, was timing.

Obama took office in 2009 as the economy was in free fall. Although he acted quickly to help, most notably with the Recovery Act and his rescue of the U.S. auto industry, the 2010 midterm elections took place before the economy had started to improve in ways most people felt in their daily lives.

That election was critical, Obama said, because it gave Republicans a chance to dominate redistricting, which takes place every 10 years. Republicans were able to draw district lines for both state and federal legislative seats in ways that locked in an advantage for their party.

“We were just at the beginnings of a recovery,” Obama said. “You know, whoever is president at that point is gonna get hit and his party’s gonna get hit. That then means that suddenly you’ve got a redistricting in which a lot of state legislatures are now Republican. They draw lines that give a huge structural advantage in subsequent elections.”

But, Obama went on to say, he focused on governing to the exclusion of politicking ― and the Democratic Party suffered.

“Because my docket was really full here... I couldn’t be both chief organizer of the Democratic Party and function as commander-in-chief and president of the United States,” Obama said. “We did not begin what I think needs to happen over the long haul, and that is rebuild the Democratic Party at the ground level.”

Obama noted that he started his career as a political organizer, and that bringing new people into the political system has long been a focus of his. He then took what sounded like a mild dig at Democrats, including those in the failed Hillary Clinton campaign, by saying Democrats need to work harder to win over voters who’ve grown skeptical of the party and who supported President-elect Donald Trump in the election.

“I want to see the Democratic Party move in that direction,” Obama said. “And what that means is that we aren’t just micro-targeting to eke out presidential victories ― it means that we’re showing up in places where right now we’re not winning a lot.”

“The big divide right now is between urban areas, which have become increasingly Democratic, and rural or exurban areas that feel as if they’re being ignored,” he went on. “And if Democrats are not showing up in those places, even if you ― even if you’re not gonna win right away, but if you’re not in there at least making an argument that, ‘Hey, you know what? It’s the Democrats who are trying to raise your minimum wage.’”