During this year’s sharply divided and brutally contested presidential election, there was one thing most voters could agree on: their dislike of both leading candidates.

So on Nov. 8, a minority of the nation’s voters tipped the Electoral College scale to favor Republican Donald Trump, the least popular candidate in the history of modern polling, over Democrat Hillary Clinton, the second least popular candidate ever, in an election in which 43 percent of eligible voters stayed home. Even Maine, always a leader in voter turnout, appears to have seen a drop in participation this year, a predictable result of an almost exclusively negative campaign.

Tuesday’s results give us one cause for hope, however: A majority of voters approved a referendum that calls for ranked-choice voting in primaries and general elections for governor, Congress and the state Legislature.

The presidential race would not have been directly affected by Maine’s new law, but it’s a good example of what can go wrong with the current system. Both Hillary Clinton and Donald Trump spent more time driving voters away from their opponent than they did on bringing new people to their own camp. Voters who didn’t like either one were forced to choose between them anyway. If they looked at another candidate, such as Libertarian Gary Johnson or the Green Party’s Jill Stein, they risked helping elect the candidate they liked the least. Hardly an inspiring civic exercise.

If 2016 had been a ranked-choice election, voters would have had more freedom to consider the options, and maybe more of them would have voted. Instead of handicapping a candidate’s chance of winning, eliminating the long shots from consideration and voting for the lesser of the remaining evils, the voter only has to decide which candidate they like the best. Then, if they have a second choice, the voter has a way to register it.

In races where there are more than three candidates, voters can rank as many choices or as few choices as they want. If there is only one candidate the voter wants to support, that vote will be counted as long as that candidate is still in the race.

There are no guarantees, but ranked-choice voting creates an incentive for candidates to stay positive. When a candidate wants support from another candidate’s supporters, there is less of an incentive to attack. To see that dynamic at work, look at the careful way that both Clinton and Trump talked about Vermont Sen. Bernie Sanders when he was running for the Democratic nomination. They didn’t say nice things about him because they agreed with him, but because they didn’t want to alienate his supporters.

Maine will have a big election in two years, with both the governor’s office and a U.S. Senate seat on the ballot. Thanks to the passage of this referendum, the whole country will be watching to see if Maine has come up with a better way to run our elections.

After watching 2016, we could hardly do worse.