One of Donald Trump’s most consistent campaign promises was to “repeal and replace” the Affordable Care Act, aka ObamaCare. His message was magnified when, in the final week of the campaign, the Obama administration announced premium hikes for benchmark plans averaging 22 percent nationwide (and reaching as high as 116 percent in one state) for insurance bought through ObamaCare exchanges. On election night, exit polls said almost half of voters thought ObamaCare went too far in reforming health care, compared to 30 percent who didn’t think it went far enough. Voters who felt that way went for Trump 83-13.

But like many things, repealing and replacing ObamaCare might be harder than the president-elect thinks. Democrats, though defeated and dispirited, still have the power to filibuster in the Senate, though Republicans might be able to push through much of repeal and replace under a procedure known as reconciliation, that allows budget-related matters to pass by majority vote. In theory, there could be a bill for President Trump to sign on his first day in office.

But what would an ObamaCare replacement look like? Trump’s own views on this during the campaign were largely incoherent. At one point he praised the Canadian and Scottish single-payer systems, which are certainly not going to be part of any Republican plan. He alternately praised and condemned ObamaCare’s individual mandate. Essentially he promised “something wonderful” and then punted it to Congress to put something on his desk that he would sign.

Designing that something wonderful may turn out to be harder than Trump and many Republicans think.

As bad as ObamaCare has been, it has played a role in reducing the uninsured rate to below 9 percent. The coverage may be overpriced and poor quality, but it will be both politically and practically difficult to take away. For example, some 9 million people are currently receiving subsidies to buy insurance through the exchanges. Will Republicans simply repeal those subsidies? If not, can they repeal the taxes that pay for them? Another 10 million people have been covered through ObamaCare’s Medicaid expansion. Studies show Medicaid is a deeply flawed program that provides remarkably little value, but Republicans are unlikely to simply pull coverage out from under recipients.

And some of the most popular provisions of ObamaCare are those that guarantee coverage for people with pre-existing conditions. Leaving those provisions unchanged while repealing the individual and employer mandates would simply accelerate the adverse selection problem that already plagues the program. There are alternative ways to protect those with existing illnesses, such as high risk pools and private “health status insurance,” but Republicans will have to explain those ideas to a wary public.

One of the few specific ideas that Trump has offered is “removing the lines from around the states,” by which he means allowing people to buy insurance across state lines. There are more than 1,300 insurers nationwide, but in many states a handful of companies control the market. Moreover, in some states regulations and coverage mandates have driven up the price of coverage. Breaking up insurance cartels and forcing greater competition, while allowing consumers to escape expensive and unnecessary regulations, will help bring down the cost of insurance.

Beyond this there are a number of replacement plans floating around coverage. In fact, one reason that Republicans have been more focused on “repeal” than “replace” is that they have had trouble coalescing around a single plan. Perhaps the most widely supported proposal right now is a bill sponsored in the Senate by just re-elected Sen. Richard Burr (R-NC) and in the House by Rep. Fred Upton (R-Mich.) that would replace ObamaCare with a universal refundable tax credit for the purchase of health insurance, along with other reforms.

But some ObamaCare opponents prefer an approach offered by Sen. Jeff Flake (R-Ariz.) and Rep. David Brat (R-Va.) that would dramatically expand health savings accounts, allowing families to save up to $18,000 tax-free, and use that money to pay for insurance premiums or out-of-pocket health-care costs. That puts control over health-care spending, in the hands of consumers.

ObamaCare remains extraordinarily unpopular, and President Trump will have something of a mandate to fix it. A free and competitive market in health care, including health insurance, can drive down costs and expand coverage.

Michael Tanner is a senior fellow at the Cato Institute and co-author of “Healthy Competition: What’s Holding Back Healthcare and How to Free It.”