SINCE 2016, Donald Trump has tried to sow doubts about the results of an election he won—claiming, for instance, that he lost the popular vote because so many “illegals” voted. Imagining how he might respond if he loses in 2020 is unsettling. Because Americans are so divided politically, they need to have confidence in the electoral process. A new report about America’s voting infrastructure from the Brennan Centre for Justice, a public policy think-tank, should alarm anyone who agrees with that.

The report finds that voting machines across America are antiquated. Fully 45 states use equipment that is no longer manufactured, and 40 use machines at least a decade old. This makes finding spare parts and undertaking essential repairs difficult and expensive. The code for some machines is so old that they no longer receive security updates, leaving them vulnerable to cyberattacks.

Many of these old machines are paperless—meaning they produce no hard copies that voters can verify, or that can be used in audits or recounts. Twelve states use paperless machines in some counties or towns, while four use them state-wide—including Georgia, where the recent governor’s election was marred by accusations of voter suppression and tampering and where the machines may have been among those hacked two years ago.

Most of those 12 states said they wanted to buy new machines that produce paper ballots, and some have even passed laws requiring that. But that is an expensive undertaking. Since 2015 Congress has distributed $380m in grants to improve election security. But that does not go very far. Officials in 31 of the 45 states with outdated voting machines said they needed to replace their machines before 2020, but two-thirds of those officials said they lacked funding to do so—even with congressional funds. Of the 12 paperless states, only one, Delaware, has secured the money to replace machines this year. And some of those federal funds will also go to pay for better cybersecurity and improving post-election audits. But not all states require audits, which tend to compare paper trails with voting-machine totals in a random sampling of districts as a way to detect fraud or irregularities.

The state of America’s voting machines raises two concerns. The first is that old, insecure machines are more vulnerable to exploitation, cyberattacks and tampering. Replacing them with newer machines would be a good first step. The other concern is that rickety voting infrastructure dents Americans’ confidence in the process; the new report comes just 20 months before the next presidential election. If the results of that election end up contested, Americans need to believe that the adjudication and dispute-settling processes are fair and reliable. Outdated, rickety voting machines without paper trails make that much harder, and risk worsening any post-election discontent.