Benjamin L. Ginsberg practiced election law for 38 years. He co-chaired the bipartisan 2013 Presidential Commission on Election Administration.

The country was lucky that President Trump and his reelection campaign were so inept. He ultimately lost by a wide margin, and his challenges to the results have been farcical. His rhetoric ramped up in inverse proportion to his ability to produce evidence supporting his charges of systemic “fraud” or “rigged” elections.

The United States might not be so lucky next time. What if the 2020 election had been as close as it was in 2000, and the outcome hinged on a state (or states) with a truly narrow margin? How would the country have fared under a Trump-style assault on democracy’s foundations?

Trump’s attempts to negate millions of votes by challenging state certifications revealed cracks in those foundations. Some shoring-up is clearly needed before the next election cycle begins. A good place to start might be with the appointment of a bipartisan commission that would propose election reforms to Congress and the states. Here are half a dozen suggestions to get things started:

Revise the Electoral Count Act of 1887, a law that came perilously close to being invoked for the first time in its history. Its muddled language would not have provided clear answers to myriad crucial questions. What happens if a state submits competing slates of electors? How to determine if a “majority” of the electoral college refers to all 538 electors or only those present and voting? If choosing the president fell to the House, with a single vote for each state, could a majority of members prevent the swearing-in of enough minority members (who nonetheless represented more states) so that the majority’s presidential candidate would win? The 1887 law clearly needs updating and clarifying.

The testing of voting machines needs to be strengthened to discourage fictional tales of “cheating algorithms.” Most states now require sample ballots to be run through each machine both before an election and before tabulation to confirm that each machine is counting correctly. Increase the number of test ballots and amend laws so that in post-election litigation, any complaining about the machines would be an obvious case of sour grapes.

Given that mail-in balloting exploded during the pandemic, and voters could well continue to favor their use, improving the security and processing of mail-in voting is vital. Technological advances that upgrade signature-match methods should be incorporated into law. States should allow the processing of mail-in ballots well before Election Day to avoid delays in reporting results, and states need to clarify whether election officials can contact voters to “cure” mistakes and omissions on absentee ballot envelopes.

All states should make their vote certification process purely a matter of administrative processing, and not subject to the sort of political gamesmanship that marred the election aftermath in Michigan.

One thing the post-election wrangling made clear is that states need to consolidate jurisdictions responsible for overseeing voting and for counting ballots. Right now, about 10,500 jurisdictions have that responsibility — far too many to ensure that all qualified ballots are treated equally. That’s a lurking equal-protection problem, especially in a very close election.

Finally, it would be helpful if the Supreme Court took up the Pennsylvania case brought to it just before the election. The court’s actions now preclude the possibility of a ruling that would affect the state’s final tally, but clarification on two issues would be welcome. Is the legislature the sole body that can determine a state’s “time, place and manner” for elections, or can a state’s supreme court and governor play a role? And does Election Day mean only the first Tuesday after the first Monday in November, as Congress stipulated in 1845, or do absentee ballots postmarked on Election Day but received later qualify?

Strengthening election laws and modernizing the processing of ballots are important, but no matter how laws are written or what upgrades are instituted, bad actors can find a way to test the limits. The 2020 election showed that the United States’ laws and institutions can always be improved. Yet the reason the system held and Trump failed was that countless individuals honorably did their duty under those laws, even while sometimes under furious attack from the president and his allies.

As a Republican, I am especially proud of how those from my own party charged with running and certifying elections met the moment. They and their colleagues in the states and localities are the reason the country passed this stress test. The Founders, in their wisdom, designed a system that could rely on Americans themselves as the nation’s last line of defense.

Read more: