The House is set to vote Thursday on its legislation to repeal and replace Obamacare.

Republican House leaders think they have rounded up enough votes to pass the measure, although it will be close.

House Majority Leader Kevin McCarthy said that Republicans have the 217 votes needed to pass the bill.

The House Rules Committee is expected to vote on several amendments to the bill during a meeting tonight, and McCarthy said he expected a vote around 12:30 to 1 p.m. Thursday afternoon.

Prospects for the American Health Care Act improved Wednesday after two key Republicans said they would support the legislation after changes were proposed to provide an additional $8 billion over five years to help cover people with pre-existing conditions.

The legislation would allow states to opt out of several Obamacare requirements, including several essential health benefits such as maternity care and hospitalization, as well as a price control called "community rating" that requires insurers to charge everybody in the same age group the same amount no matter how sick they are.

Another amendment to the American Health Care Act would create high-risk pools, funded with $15 billion, for states to help pay for high medical costs in states that opted out, which is what the extra $8 billion in funding would go toward.

Republican Reps. Fred Upton of Michigan and Billy Long of Missouri announced their decision after meeting with President Trump about the legislation.

Upton had said Tuesday that he would not support the bill even with additional funding.

House Whip Steve Scalise said that the new amendment did play a part in getting some Republicans on board.

"The amendment was an important piece to a number of members who wanted to continue to put even more protections in place for people with pre-existing conditions and lower premiums," he said.

McCarthy and Scalise also referred to the potential for the last Obamacare insurer for most of Iowa to pull out. On Wednesday, the third of four insurers on Iowa's Obamacare exchanges said it was looking to pull out next year.

"It shows you how devastating a failure Obamacare is," Scalise said.