Republicans are in a mad dash to get tax reform passed in the Senate this week and on President Donald Trump’s desk by Christmas.

Senate Republicans unanimously voted to begin debate on their tax plan Wednesday evening, triggering what will be a whirlwind two days of floor debates and proposed amendments before the bill is given a full vote. The proposal radically cuts corporate taxes, offers temporary tax cuts for individuals, and repeals Obamacare’s individual mandate, which is estimated to leave 13 million fewer insured by 2027. The House has already passed its own — very different — plan.

In the past, Trump has said he would sign “maybe the biggest tax cut we've ever had,” and promised he would help the middle class, make the United States more competitive internationally, bring almost unprecedented economic growth in the years to come, and eliminate the federal debt in eight years while he’s at it.

But that’s not at all what this bill does. Instead, it’s just become a race to figure out what can get 51 votes in the Senate and 218 votes in the House to pass. Even as senators voted to proceed to debate, many key elements of the tax plan were still up in the air, as Republican senators tried to hash out last-minute deals. The tax plan is well on its way, but there are a lot of procedural steps ahead, and the whole deal could fall apart at any juncture.

“When you have a very slim majority, three of four senators ... control the destiny of tax reform, and [that’s] just unacceptable for the American people,” Rep. Jim Renacci (R-OH), who sits on the tax-focused House Ways and Means and Budget committees, said.

It looks like there is determination among Republican ranks to get this done. Here’s what they need to do to.

Part 1: pass the Senate’s bill

For the tax bill, the magic number in the Senate is 51. As in their strategy with Obamacare repeal, congressional Republicans are planning to pass their tax plan through a congressional loophole called budget reconciliation, which allows Congress to pass bills with a simple majority (51 votes) and bypass the threat of a Democratic filibuster. At the very least, GOP leadership needs 50 of the 52 Republican senators and Vice President Mike Pence to sign on to whatever tax bill they put on the Senate floor.

There are several procedural steps to get there.

1) Majority Leader Mitch McConnell made a motion to start debate on the House’s tax bill Wednesday evening. The motion to proceed passed with unanimous Republican support at 52-48, with all Democrats voting against. While this is usually a good indicator of how the final vote will go, as we saw with the health care debate, a senator could always vote to keep process moving and vote against the final bill, especially with so many details of the final tax bill up in the air.

2) Now that the motion to proceed has passed, it will trigger 20 hours of debate, divided evenly between Republicans and Democrats. It’s rumored that Republicans will try to begin debate Wednesday, to set themselves up for a vote by Thursday or Friday.

3) At the end of debate there is a “vote-a-rama,” when senators can offer unlimited amendments to the bill.

All of this is on the House’s tax bill until McConnell introduces an amendment to substitute the House bill with the Senate’s version. None of the amendments offered before McConnell’s substitute will impact the Senate tax proposal.

4) At the end of the vote-a-rama,” the Senate will vote on the final amended tax bill. It needs 51 votes to pass.

There’s some complicating politics at play throughout this process. To win votes, Senate leadership has given members assurances of what will be in the bill. So far those amendments have only been discussed conceptually. If they don’t make it into the final product, the bill could lose crucial votes.

Part 2: pass the same bill out of the House and the Senate

The House and Senate have to pass the same bill for it to become law.

Despite months of negotiations between top House and Senate members and members of Trump’s administration — a working group dubbed the “Big Six” — Republicans in the House and Senate came out with two drastically different bills.

That means if the Senate passes its bill, two things can happen: 1) the House could take up the Senate’s bill and pass it outright, or 2) the House and Senate have to come together and hash together a hybrid of the two bills in what’s called a conference committee.

With such a slim margin in the Senate, it wouldn’t be unheard of for the House to just try to pass the Senate’s bill. But that would break a lot of goodwill with House Republicans, many of whom took a difficult vote on a promise of more negotiations once the Senate was done with its work.

Senators, too, are expecting a conference with the House.

As Vox’s Andrew Prokop explained, a conference committee is the formal process by which the House and Senate can bring together different versions of the same bill:

The gist is that after the House and Senate both pass some version of a bill, each chamber will name designate some of its members to be their negotiators — the conferees. Sometimes these are members who have expertise in a particular issue area, and sometimes they’re members handpicked to do leadership’s bidding. And this is a bipartisan process — the minority party gets to appoint conferees too, in proportion to how many seats they control in each chamber.

There are some rules: Those on the committee “may not change a provision on which both houses agree, nor may they add anything that is not in one version or the other,” according to the Congressional Research Service.

The final product is a “conference report,” which is passed by the majority of the members in the conference committee and then sent to the full House and Senate floors. Both the House and Senate have to pass the conference report outright for it to be sent to the president’s desk.

There are some timing issues that could impact this process. Sen. Susan Collins (R-ME) told reporters Tuesday that if she is going to vote on the Senate’s tax bill, she wants to see two Obamacare stabilizations bills passed before the conference report comes out. That doesn’t give Republicans a lot of time to get those health care bills passed — and it requires Collins to put a lot of faith in Republican leadership that the House won’t just pass the Senate’s first bill without changes.

Part 3: the president signs it

President Trump visited the Capitol as senators geared up for a vote this week, and showed he was willing to support almost anything that he could call a tax bill.

He left the building with some serious momentum behind the tax overhaul.

“It was great. It was fun,” Sen. Lindsey Graham (R-SC), who also met privately with Trump, told reporters. “He was so good. He was so nice, so nice, so upbeat, so good. The best meeting we had. I really thought the president hit it out of the park.”

If Congress can get this done, the tax bill goes to the president’s desk, and we can expect a lot of pomp and circumstance.

As Vox’s Ella Nilsen reported, if Republicans do get this bill on Trump’s desk by the end of the year, the reforms would come into effect on January 1, 2018. But individuals filing taxes in the spring likely wouldn’t feel the full impact until the following year.