The unthinkable has already happened: A presidential nominee has been caught bragging about sexual assault, his party committee has pulled its funding, major party leaders have un-endorsed him, and the nominee’s running mate has scaled back his public appearances.

So now, equally unprecedented scenarios are being considered: compelling Donald Trump to withdraw, kicking him off the ticket, and Mike Pence withdrawing, among others. A few months ago, I outlined the legal steps for how the Republican National Committee could “dump Trump.” But could it still do so with less than 30 days until the election?

Mostly, yes. Here’s why.

1. Trump withdraws. What then?

The simplest post-Trump scenario is if he is persuaded to withdraw. This seems increasingly unlikely: Trump himself has said there is “zero chance” of his quitting, and over 75 percent of Republican voters want him to stay. But suppose that changes. What would happen?

According to the RNC rules, the committee itself picks a replacement. That person does not have to be Mike Pence; it could be absolutely anyone. Indeed, although Pence seems like the obvious choice (if he’d do it), it might be easier to bring in another figure—perhaps an “elder statesman” as some Republicans have been proposing.

Because the state ballot deadlines have now all passed (and some overseas votes have already been cast), Trump’s name would stay on all the ballots. But don’t forget the electoral college. You don’t really vote for president—you vote for delegates to the electoral college, who in turn vote for president.

The rules for electors vary state by state and believe it or not, in 25 states, electors are technically free to vote however they please. These states are Arizona, Arkansas, Delaware, Georgia, Idaho, Illinois, Indiana, Iowa, Kansas, Kentucky, Louisiana, Minnesota, Missouri, Nevada, New Hampshire, New Jersey, New York, North Dakota, Pennsylvania, Rhode Island, South Dakota, Tennessee, Texas, Utah, and West Virginia. Virginia has a statute, but it’s only advisory (electors are “expected” to vote for nominees), so it should count as state 26.

Of course, electors are chosen from among party loyalists, so in normal years, none of this matters. But this is not a normal year.

In the remaining 24 states, plus the District of Columbia, the statutes vary.

In five states, electors must sign a pledge that commits them to a specific individual: Alabama, Massachusetts, Mississippi, South Carolina—and since Michigan requires electors to vote for the candidates “appearing on the Michigan ballot,” it should be on this list too.

In 15 states plus D.C., however, electors sign a pledge that commits them to the party, not the individual: Alaska, California, Connecticut, Florida, Hawaii, Maine, Montana, Nebraska, New Mexico, North Carolina, Ohio, Oklahoma, Oregon, Washington, and Wisconsin.

Note that in most of these states, electors simply pledge to vote for the “candidates of the party” that chose them. So in these states, even if the electors were hardcore Trump supporters, they would be required by law to vote for the Republican Party’s candidate.

Colorado, Maryland, Vermont, and Wyoming require electors to vote for the “candidates… receiving the highest number of votes.” Is someone still a candidate, legally speaking, if they have withdrawn but their name appears on the ballot? Probably not, so I’ll put these four states on the “party” list.

In sum, 26 states leave it up to the electors, 19 (plus D.C.) specify the party, and only five states specify the individual candidate. And even in those five states, surely no court would enforce a pledge signed for a candidate who is no longer a candidate. It may be the letter of the law, but hardly the spirit.

(Politico recently ran a story saying 31 states have restrictive laws, but the article relied on a page that says “Last Updated December 2009.” My research above is based on the official U.S. National Archives page, updated March 1, 2016.)

Of course, while it may be legal for a non-Trump candidate to receive the “Trump” votes, politically this would still be a disaster for Republicans, with tens of millions of Trump voters outraged at the “rigged” system even if Trump withdraws voluntarily.

But it would be legal.

2. Trump stays, but the party tries to dump him

Since The Daily Beast first explored the issue in August, pundits have been split on whether the GOP could dump Trump without his consent. Most recently, experts in The New York Times called doing so a “triple bank shot.”

A better analogy is a foul shot; while not certain, I’d put the odds around 50/50.

As we reported in August, the key bit of language (PDF) is that the RNC can fill “any and all vacancies which may occur by reason of death, declination, or otherwise of the Republican candidate for President of the United States or the Republican candidate for Vice President of the United States.”

I agree that the plainest meaning of “otherwise” is some other form of physical incapacitation. But is it so outrageous to include mental “unfitness” or some other inexact condition within the ambit of that term? I don’t think so. The RNC would be interpreting its own rules here, and Trump’s (inevitable) lawsuit would have to claim that they’re wrong.

This wouldn’t be a case of the RNC just changing its mind; it would be based on Trump’s long history of instability and inability to control himself, from the 2005 tape (and numerous previous examples) to Humayun Khan and Alicia Machado. It would be based on every mainstream Republican in leadership calling Trump unfit for the presidency.

Yes, it would be unprecedented. Yes, it would lead to open revolt among Trump’s supporters. But if the overall survival of the Republican Party is really at stake, is it really that far-fetched?

If courts were to uphold a non-consensual Trump Dump, then the same process would unfold as in the first scenario: new nomination, Trump’s name on the ballot, electors voting for the replacement candidate. If said candidate wins any states, of course.

3. Pence withdraws

Finally, what about Mike Pence, the “Evangelical Catholic” whose faith is apparently sincere, conservative, and antithetical to everything a sexual-assaulting, profanity-spewing Lothario stands for?

The Pence camp has sent mixed signals on the Indiana governor’s interest in staying in the race. From a religious perspective, it wouldn’t be that difficult; the sexual assault conversation happened in 2005, and evangelicals love the sin-contrition-forgiveness narrative. Indeed, when liberals often complain of conservative hypocrisy, they misunderstand conservative religious beliefs, which often acknowledge that all of us are sinners—which is precisely why we need God/The Bible/the law to save us from ourselves. The more sin, the more need for salvation.

But suppose Pence has had enough. If he were to quit, the process is straightforward—but has a crucial twist. Unlike Pence, who was selected by the Trump campaign, the new vice presidential candidate would be selected by the RNC.

In other words, the Republican leadership could put up a VP candidate who runs against Trump, rather than with him. And why not? They’re already conceding the presidential election at this point—the best they can do is staunch the bleeding and try to preserve the Republican “brand.” A Trump-McCain ticket (for example) is ludicrous on the face of it, but it would give the Republican mainstream a strong platform to say “We’re Not With Him.”

This actually does have precedent. Remember what happened in Hamilton? Until the 12th Amendment was ratified in 1804, the office of vice president was given to the runner-up in the presidential election—i.e., the person who had just run against the president.

Of course, the reason the 12th Amendment was ratified in 1804 was exactly what happened in Hamilton, with the 1800 election resulting in Democratic-Republican Thomas Jefferson serving with—but really against—the Federalist John Adams. (That election didn’t work out well for Alexander Hamilton and Aaron Burr either.) But it would be no coincidence that a provision put into place with the advent of the modern party system is now tweaked as that party system seems to be falling apart.

In any case, if Pence drops out, the RNC picks his replacement—with or without Trump’s approval—and that replacement will get most electors’ votes, even though Pence’s name would remain on the ballot.

The most likely of all these scenarios? None of them. Most likely, we will muddle through with Trump versus Clinton, the Republican Party will focus on other races, and no one will much care about electoral college rules.

Then again, this year, unlikely is the new likely.