Nearly 14 years after it was written, the public can finally read the 22-page letter to a federal judge that justified intercepting phone and email records of millions of Americans—the extent of which eventually prompted Edward Snowden to leak details about the National Security Agency (NSA) data collection program.

The document, written by a deputy in the Department of Justice, is a circuitous journey of logical leaps that seems to argue for exempting the president from following certain laws, exempting the military from the Fourth Amendment prohibition against unreasonable searches and seizures, and for implying that terrorists operating in the U.S. are a foreign occupying army. It even compares electronic spying to drunk driver sobriety checks. The 9/11 attacks are mentioned throughout as justification.

Whether you’re for or against antiterrorism surveillance in the U.S., the letter by former Deputy Assistant Attorney General John C. Yoo is a challenging read. It starts out seeming to explain why the president can’t do mass surveillance without a warrant. The NSA doesn’t conduct surveillance in the U.S. or involving U.S. citizens, he says; and the FBI, which does operate in the States, is required to get a warrant under a 1978 law called the Foreign Intelligence Surveillance Act (FISA).

President Truman, who created the NSA, specified that it not operate in the U.S., but a president doesn’t have to follow his own orders, let alone those of a previous president, says Yoo. Nor does he have to tell anyone that he’s changed the rules. “In doing so, he need not issue a new executive order, rescind the previous order, or even make his waiver or suspension of the order publicly known,” writes Yoo.

The more challenging part is the explanation of why laws sometimes don’t apply to the president. “We do not believe an electronic surveillance program, undertaken in response to the September 11, 2001 attacks, could fully satisfy FISA standards,” writes Yoo. But the president doesn’t have to follow this law, he says, because Congress can’t tell the president what to do in national security matters. “FISA can regulate foreign intelligence surveillance only to the extent permitted by the Constitution’s enumeration of congressional authority and the separation of powers,” writes Yoo. He then throws in an extra dig: “FISA itself is not required by the Constitution, nor does it necessarily establish standards and procedures that exactly match those required by the Fourth Amendment.”

Now we get to the highest law of the land: the Constitution. It Fourth Amendment prohibits “unreasonable searches and seizures” and requires warrants based on probable cause that specify exactly what will be searched and seized. This would be a tough nut to crack, but Yoo finds a way by concluding that the government’s actions “would not constitute a ‘search’ for constitutional purposes.”

Foreigners aren’t covered by the Constitution, writes Yoo, and “much of the communications that the NSA would intercept would be those of non-U.S. persons abroad.” Yoo doesn’t really address the part of communications that would involve U.S. citizens, but instead jumps to the accepted practice of searching anything or anyone that crosses the U.S. border, including snail mail. “Electronic mail is just a different method of transporting a communication across the border of the United States,” says the letter. Here seems to be the genesis of the NSA’s ability to suck in communications that pass between the U.S. and other countries, regardless of where they begin and end—leading to the dilemma discovered by comedian John Oliver that the NSA could look at Americans’ dick pics.