The Senate’s 2019 budget contains an across-the-board salary hike of about 1.9 percent for all federal employees. That is not good news.

Though modest and deficit-neutral—the bill requires agencies to reduce spending elsewhere to offset the hikes—this pay raise is a bad idea. A growing consensus of policy analysts agree that the federal pay system needs a major overhaul.

Today, federal employees earn raises for time served rather than good work. While federal managers can offer high performers cash awards and raises, the latter are rarely used and the former are too paltry and too freely given to be effective motivators.

In a recent survey, only 26 percent of federal employees reported that “pay raises depend on how well employees perform their jobs.”

The Trump administration has called for a pay freeze—the first since 2014—and wants to use the savings to create a $1 billion performance-based pay fund.

This is a promising idea. Since the 1980s, various agencies have experimented with performance-based pay. Some of these programs were plagued by poorly construed metrics for determining who should receive a bonus. Other programs effectively rewarded strong performers and led to better functioning workplaces.

In other cases, public sector unions—reliable opponents of any effort to distinguish good employees from poor performers—scuttled pay-for-performance plans despite initial signs of success.

Performance-based pay is an area where the federal government can learn from the states. Over 20 states have at least partial performance-based pay systems for public employees.

Tennessee—one of the most fiscally responsible states in the country—has a particularly successful pay-for-performance plan that some have praised as a possible model for federal agencies. Since implementing pay-for-performance, student test results have improved, Medicaid-funded health care has gotten better, and newly-motivated state bureaucrats have identified and cut $500 million in waste from the state budget.

State pay-for-performance plans like Tennessee’s and successful federal agency plans have a few things in common.

First, they do not just give managers permission to hand out cash, they also revamp the way employees are appraised. Right now, 99 percent of federal employees are ranked “successful” or better, which means nearly all are eligible to receive performance-based bonuses.

Before experimenting with a new performance rating system, agencies should assure that managers are making meaningful distinctions between employees. Otherwise, managers will have to either hand out performance-based raises and bonuses to everyone or risk the appearance of favoritism.

Successful pay-for-performance systems also rely on properly trained managers. When Tennessee instituted its program, it also implemented online training courses, hired leadership coaches, conducted internal audits, and offered goal-writing clinics.

The lessons stuck. Instead of relatively meaningless ratings, Tennessee’s ratings came to actually reflect employees’ performance. The percent of employees rated either “outstanding” or “advanced” declined from 83 percent in 2010 to 36 percent in 2016.

If the Trump administration succeeds in creating a $1 billion fund to fuel pay-for-performance, agencies should emulate states and other federal agencies that have already made this transition effectively.

Even if Congress does not authorize the administration’s performance-based pay plan, an across-the-board pay increase does not make sense given the skewed compensation premium received by federal workers. The Congressional Budget Office estimates that the average federal employee receives 17 percent more in total compensation than their private-sector counterparts, and a Heritage Foundation analysis estimated a 40 percent premium.

This compensation gap is not uniform across federal employees, however. While federal workers with a high school degree or less received 53 percent more total compensation than their private-sector counter parts, the premium was 21 percent for federal employees with a bachelor’s degree, and federal workers with a master’s degree or more actually received 18 percent less total compensation than their private-sector counterparts.

While giving a raise to already-overpaid, low-skill federal laborers does not make sense, the comparatively low compensation of high-skill workers is a major problem that should be addressed. As the Office of Management and Budget rightly observes, “across-the-board pay increases have long-term fixed costs, yet fail to address existing pay disparities, or target mission-critical recruitment and retention goals.”

Many agencies desperately need more cybersecurity personnel, for instance, but the compensation gap prevents them from attracting those workers. While the federal government may never be able to match Silicon Valley salaries, more civically-minded coders may choose the public sector if its compensation was at least within striking distance.

A pay freeze could be seen as an unfair indictment of the federal workforce. Indeed, federal employees are too often castigated for the actions of a few bad apples. The vast majority of federal employees are hardworking professionals who believe in the mission of their agency and are committed to serving their country. And they should be fairly compensated and rewarded for doing so.

The federal employee compensation system fails federal employees and federal taxpayers alike. A pay system that rewards high performance and better attracts talented professionals will benefit both the public and public-sector employees.