Next year, one of the biggest flaws in the US electoral system could be on its way to getting fixed—or made much worse. On June 19, the US Supreme Court announced it would hear arguments on the Wisconsin partisan gerrymandering case, Gill v. Whitford.

Electoral districts are redrawn every 10 years, after the census, to allow for shifts in population. But that’s an opportunity for the party in power to alter them to its advantage, by clustering voters for one party in one district or spreading them out across multiple ones. Gerrymandering to exclude or include people by race has been outlawed, but partisan gerrymandering—redistricting purely to favor a party—is still technically permissible.

That’s because, although the Supreme Court first ruled partisan gerrymandering unconstitutional in 1986 and has reaffirmed the ruling since, it’s rejected every proposed standard for proving gerrymandering took place.

Fast-forward to Wisconsin’s state elections in 2012, in which Democrats won more than half the votes but only 40% of the seats, and blamed that on redistricting by the Republican-controlled legislature the year before. This time, those arguing the case are proposing that the court adopt as its standard a mathematical measure of how skewed electoral districts are.

The “efficiency gap,” a model developed by two professors, Eric McGhee and Nicholas Stephanopoulos, calculates for wasted votes: votes that were not needed in order to secure a win. If one party has far more wasted votes than the other, the districts are gerrymandered. Stephanopoulos explains it thus:

Suppose…that Party A wins four of the seats 53 to 47, and Party B wins one of them 85 to 15. Then in each of the four seats that Party A wins, it has 2 surplus votes (53 minus 51 needed to win), and Party B has 47 lost votes. And in the lone district that Party A loses, it has 15 lost votes, and Party B has 34 surplus votes (85 minus the 51 needed to win). In sum, Party A wastes 23 votes and Party B wastes 222 votes. Subtracting one figure from the other and dividing by the 500 votes cast produces an efficiency gap of 40 percent in Party A’s favor.

Or to put it as an equation (pdf):

Efficiency gap = (party B’s wasted votes – party A’s wasted votes) ÷ total votes

If the Supreme Court accepts this standard, it will set limits to partisan redistricting that will affect the whole country. If it rejects it, incumbent parties may feel free to gerrymander even more. Paul Smith, vice-president of litigation and strategy at the Campaign Legal Center (CLC), will be arguing the case before the court. We asked him to explain how it will work.

What are the next steps?

This summer, Supreme Court justices will sit in their chambers reading briefs. CLC and Wisconsin’s litigators will each send in merit briefs that argue their point of view. “Wisconsin goes first, then us, and then a reply by Wisconsin,” Smith said. “A week after each of the parties files, amicus briefs supporting that side will be filed” by third parties, such as scholars and voting-rights organizations.

The justices will emerge in October to hear the litigators’ oral arguments. Each side’s selected lawyer gets just half an hour to speak. Justices frequently interrupt with questions. The court then writes its opinion, which might not come out until spring 2018 or later.

When will a ruling take effect?

If the Supreme Court adopts a standard for partisan gerrymandering, it won’t affect how new districts are redrawn until 2021, after the 2020 census. However, before that the ruling could spark lawsuits in many states contesting the outlines of existing districts. Those will be decided by judges in federal courts. (This is where US president Donald Trump could influence the process; there are more than 130 vacant federal judgeships that he could fill.)

How could the court define gerrymandering?

Smith says, “The basic definition is a map that does not treat the two parties symmetrically. When there is no gerrymandering, one would expect that if the Republicans get 60% of the seats when they get 55% of the votes, the same should be true for the Democrats when they get 55% of the votes. That is symmetry. The new tests like the efficiency gap help to measure the degree of asymmetry and allow you to compare one gerrymander with others around the country and going back in time. That’s how we can say that the Wisconsin gerrymander is one of the most extreme in recent memory.”

How many electoral districts will be affected?

Smith says, “It’s hard to know how many maps will be subject to a successful challenge if we win. That depends in part on how the court articulates the rule. But there certainly are other extreme gerrymanders out there, executed by both parties. The other big effect will be moderating how new maps are drawn across the country in 2021 after the 2020 census.”

Why has it taken so long for this to be addressed?

Smith says, “There have been prior cases. But the court has each time failed to articulate a meaningful and workable standard limiting gerrymandering. The problem seems to be that the justices think it’s unrealistic and maybe also improper to demand that legislators entirely ignore politics in writing district lines. They also think it raises constitutional problems when this effort to inject bias goes too far. But they have not been clear on how to differentiate cases involving minor amounts of political tinkering from cases involving serious and unconstitutional gerrymandering. We hope we can persuade the court that newly developed mathematical tests can serve that purpose.”