Our Pennsylvania legislature appears poised to turn a bad idea — electing appellate judges — into an even worse idea — making appellate judge elections regional, instead of statewide.

Earlier this week, the Pennsylvania House Judiciary Committee narrowly approved House Bill 38, a proposal to amend our constitution to carve up the commonwealth into seven districts for the Supreme Court, 15 for the Superior Court, and 10 for the Commonwealth Court. When a vacancy occurs, only the voters in the district in which the judge or justice resides would vote for him or her.

Having voters select appellate court judges is already a bad idea because the process instantly converts judicial candidates into mini-politicians. Most states know better than to elect appellate judges. Pennsylvania is one of only seven states, including Mississippi, Louisiana, and Texas, that elect all of their appellate judges in partisan contested elections.

» READ MORE: Pa. could become a national outlier in how it elects appellate judges. Here’s why experts are worried.

And let’s be honest. Very few voters know any of the candidates who run in these elections. The most they know comes from self-serving advertising fueled by big money contributed by groups who have an interest in matters that typically come before the court. In 2015, Pennsylvania was first among the 50 states in the amount of money raised and spent on judicial elections that year. The inevitable presence of big donors and big money as part of the process understandably causes people to lose confidence in the fairness and objectivity of the judicial system. Polls on the subject have established that this is so.

But if HB 38, which could appear as a ballot question in the Pennsylvania primary in May, becomes law, the problem of electing appellate judges gets even worse.

Regional appellate court campaigns will be filled with covert or even overt promises to “do good” for the people of that region whose narrow interest may well be different from the state as a whole. As it is now, appellate court justices and judges render decisions that apply statewide and interpret laws that apply statewide. They do not consider how their decisions will affect one region more or less than another.

Consider this example: A few years back, in a property tax case before the state Supreme Court, Allegheny County had not reassessed property for tax assessment purposes for over 10 years and was sued to require reassessment in order to equalize taxes as required by our state constitution. When the Supreme Court held that a reassessment was required, its decision applied to all counties which were in violation of the law — not just Allegheny County. Imagine the pressure on a justice of a region that did not want to reassess or from a donor who did not want to be reassessed. Would the justice be thinking about the retention election to come if she voted in the Allegheny County case in favor of requiring reassessment? Would that justice be thinking about her political future in her region rather than to the “greater good” of the entire commonwealth?

HB 38 also increases the likelihood of “horse-trading” of votes — you vote for my regional issue, and I’ll support your regional issue. The interests of the state as a whole become subordinate to regional interests.

Fortunately, several Pennsylvania legislators have taken the position that rather than doing regional elections, the House should move forward with a merit selection bill — House Bill 263 — that the Judiciary Committee approved last year.

This is the right course for Pennsylvania. Instead of taking a bad idea — judicial elections — and making it worse by “balkanizing” the elections, it would do away with the election of appellate judges entirely.

Instead of making a bad idea worse, Pennsylvania legislators should move forward with a good idea for our commonwealth: Change how appellate judges get their jobs by making them appointed positions.

Ronald Castille is a former district attorney of Philadelphia and served on the Supreme Court of Pennsylvania from 1994 to 2014. He was chief justice from 2008 to 2014. Robert C. Heim is a former chancellor of the Philadelphia Bar Association and is chairman of Pennsylvanians for Modern Courts. He is a partner in the Dechert LLP law firm.