Donald Trump and Bernie Sanders don’t agree on much. Nor do the Black Lives Matter movement, the Occupy Wall Street protests and the armed ranchers who seized public lands in Oregon. But in the insurgent presidential campaigns and in social activism across the spectrum, a common thread is people angry at the way this country is no longer working for many ordinary citizens.

And they’re right: The system is often fundamentally unfair, and ordinary voices are often unheard.

It’s easy to roll one’s eyes at Trump, for a demagogic tycoon is not the natural leader of a revolution of the disenfranchised. But the populist frustration is understandable. One of the most remarkable political science studies in recent years upended everything rosy we learned in civics classes.

Martin Gilens of Princeton University and Benjamin I. Page of Northwestern University found that in policymaking, views of ordinary citizens essentially don’t matter. They examined 1,779 policy issues and found that attitudes of wealthy people and of business groups mattered a great deal to the final outcome – but that preferences of average citizens were almost irrelevant.

Never miss a local story.

Sign up today for a free 30 day free trial of unlimited digital access.

“In the United States, our findings indicate, the majority does not rule,” they concluded. “Majorities of the American public actually have little influence over the policies our government adopts.”

One reason is that our political system is increasingly driven by money: Tycoons can’t quite buy politicians, but they can lease them. Elected officials are hamsters on a wheel, always desperately raising money for the next election. And the donors who matter most are a small group; just 158 families and the companies they control donated almost half the money for the early stages of the presidential campaign.

That in turn is why the tax code is full of loopholes that benefit the wealthy. This is why you get accelerated depreciation for buying a private plane. It’s why the wealthiest 400 U.S. taxpayers (all with income of more than $100 million) ended up paying an average federal tax rate of less than 23 percent for 2013, and less than 17 percent the year before.

Conversely, it’s why the mostly black children in Flint, Michigan, have been poisoned by lead coming out of the tap: As Hillary Clinton noted Sunday in the Democratic debate, this wouldn’t have happened in an affluent white suburb. Lead poisoning permanently impairs brain development, but it’s not confined to Flint. Some 535,000 children across the country suffer lead poisoning, according to the Centers for Disease Control and Prevention.

Those kids never have a chance – not just because of the lead, but also because they don’t matter to the U.S. political system. U.S. politicians are too busy chasing campaign donors to help them.

There are solutions, but a starting point is to recognize that this public mood of impotence and unfairness is rooted in something real. Median wages have stalled or dropped. Mortality rates for young white adults are rising, partly because so many self-medicate with painkillers or heroin. Blacks have been protected from this phenomenon by another unfairness: Studies indicate that doctors discriminate against black patients and are less likely to prescribe them painkillers.

America’s political and economic inequalities feed each other. The richest 1 percent in the U.S. now own substantially more wealth than the bottom 90 percent.

Solutions are complex, imperfect and uncertain, but the biggest problem is not a lack of tools but a lack of will. A basic step to equalize opportunity would be to invest in education for disadvantaged children as the civil rights issue of the 21st century.

“I think any candidate seriously aiming to reduce inequality would have a mild increase in tax on the rich to fund higher school spending,” says Nicholas Bloom, a Stanford expert on inequality. I would add that investments in education should begin early, with high-quality prekindergarten for at-risk children.

We also need political solutions to repair our democracy so that ordinary citizens count along with the affluent. “There is no magic bullet that will set things right, but meaningful campaign finance reform must be at the center of a reform agenda,” Gilens says. “States and cities are leading the way. Arizona, Maine and Connecticut have had statewide, publicly funded ‘clean election’ systems for some time with varying degrees of success.”

One step toward transparency: President Barack Obama could require federal contractors to disclose political contributions.

Right now, the bitterness at America’s grass-roots is often channeled in ways that are divisive and destructive: at immigrants, say, or at Muslims. The challenge will be to leverage the populist frustration into constructive post-election policy. But it has been done before.

“Reforms were adopted in the first Gilded Age, an era similarly plagued by government dysfunction, political corruption and enormous economic inequality,” Gilens notes. “Perhaps they will be again.” For the sake of our country, let’s work for an encore.