The recent federal budget deal includes $380 million to help states secure their voting processes in the wake of revelations about Russians seeking to influence our elections. But better equipment and software alone won’t address an important hack that occurred in 2016.

As revealed in February indictments by Robert Mueller, Russian operatives weaponized an antiquated rule of American democracy: the loophole that allows candidates to win all of a state’s electoral votes with less than 50 percent of the vote. Under our “plurality voting” laws, Donald Trump could win key battlegrounds if anti-Trump voters failed to consolidate behind Hillary Clinton.

The New York Times’ Maggie Haberman tweeted about Mueller’s indictments that a “big aspect of the Russian meddling was encouraging voting for a third-party candidate.” One Russian ad urged progressives to “choose peace” and vote for Green Party nominee Jill Stein as “the only way to take our country back.” The ad declared, “Trust me, it’s not a wasted vote.”

But for those with a preference between Trump and Clinton, it was due to our election method. Democratic consultant David Axelrod commented that “if Russians sought to redirect alienated HRC (Clinton) voters to third parties, as indictment alleges, it was a shrewd ploy.” Indeed, Stein ultimately won more votes than Trump’s victory margins in Michigan, Pennsylvania and Wisconsin, which collectively had enough electoral votes to decide the presidency.

The Russians aren’t alone in manipulating this election method vulnerability. A ProPublica investigation revealed that allies of Democratic Senator Jon Tester in 2012 spent big money to boost a Libertarian as the “real conservative” in Montana. Tester ultimately won by 3.7 percent, with 6.6 percent going to the Libertarian. As Republicans take on Tester this year, a Republican activist has been exposed trying to secure the Green Party nomination to take votes away from Tester.

Such appalling tactics will remain “shrewd” as long as we maintain plurality voting. Fortunately, there’s a proven solution to the “plurality hack”: ranked choice voting. Voters rank their choice of candidates in order of preference, and ballots are counted in a series of “instant runoffs.” If a candidate wins a majority of first choices, that candidate wins, just like in any election. If not, the candidate with the fewest votes is eliminated, and their ballots go to the candidate ranked by the voter next on the ballot. This process continues until a candidate wins a majority.

Voters in Maine’s June primaries are slated to use ranked choice voting to select party nominees for all federal and state offices, including gubernatorial primaries with seven Democrats and four Republicans. Santa Fe recently had its highest turnout in years after joining cities like San Francisco, Oakland, Minneapolis and St. Paul in electing their mayors with ranked choice voting. Bills advancing the system were introduced in nearly half the states in 2017-2018, with two bills signed into law in March by a Democratic governor in Oregon and Republican governor in Utah.

How ranked choice voting might have affected the outcome of the 2016 presidential election is unclear. Fourteen states were won without a majority of the vote — seven each by Trump and Clinton, who likely benefited from the presence of Libertarian nominee Gary Johnson on state ballots. But allowing voters to rank their candidates at least would have defanged one key form of Russian meddling.

Congress’s decision to appropriate funds to improve our election infrastructure was grounded in a bipartisan report from the Senate Intelligence Committee. Committee Chair Richard Burr, R-North Carolina, explained, “It is clear the Russian government was looking for vulnerabilities in our election system. … We need to be more effective at deterring our adversaries.”

We no longer can ignore the inherent weakness in the way we vote. It’s time for Congress to establish ranked choice voting for congressional elections and appropriate funds to help states implement it for presidential elections. States of course don’t need to wait. By adopting ranked choice voting, they will better secure the vote from outside interference, give voters greater choice, and uphold majority rule.