Senator Leahy (D-Vt.) introduced todaya new version of the USA Freedom Act to rein in NSA surveillance, and only 10 legislative days remain to get it through the Senate before the November elections.

To put this in historical context: If the Senate passes the bill, it will be the first time since passage of the Foreign Intelligence Surveillance Act in 1978 that the chamber has taken action to constrain the intelligence community, and the first time Congress has a real shot at restoring the crucial privacy protections lost in the Patriot Act. To quote Joe Biden during the signing of the healthcare bill, "This is a big f---ing deal."

The bill represents a compromise between companies, privacy groups, Senate negotiators, the White House, and the intelligence community. It's not perfect, and it only deals with one narrow surveillance authority, but here's why the ACLU supports the bill as introduced:

It ends bulk collection and significantly limits the ability of the government to conduct dragnet surveillance under Section 215 of the Patriot Act.

You might remember that one of our main criticisms of the House-passed version of the USA Freedom Act was that it contained a broad definition of "specific selection term" (SST), which, simply put, is the term that the government uses to describe the records it wants to collect. As it was approved in the House, that definition could be abused to permit the collection of everyone's records in an entire area code or zip code, even an entire network server.

The new version of the bill creates an exhaustive list of permissible SSTs for certain programs. If the new version works properly, the government will no longer be able to abuse the provision that led to the collection of the call detail records of virtually everyone in America.

For programs without an exhaustive list of SSTs, the bill contains language indicating that the SSTs must be narrowly limited, and it explicitly prohibits broad SSTs based on, for example, an entire city or telephone service provider. The intent of these provisions is to put an end to other bulk or "bulky" collection programs, such as the CIA's reported bulk collection of certain financial data. And, as an additional protection, in some cases, the bill also explicitly requires the government to destroy irrelevant information that it collects.

If the government abuses its authority, this bill could ensure we would find out about it.

If the Snowden revelations taught us anything, it was that the government does a whole lot of things that the public and members of Congress don't know about. In response, this bill contains provisions that would require the Foreign Intelligence Surveillance Court (FISC) to release opinions or at least relevant information about important opinions.

In other words, if the court decides to interpret existing law to permit collection of everyone's email in Washington, D.C. – we've got a better shot at knowing.

The bill would place someone inside the FISC to advocate for us.

Currently, in secret Foreign Intelligence Surveillance Court proceedings, there are two parties – the judge and the government attorney arguing for surveillance. That's like a prosecution with no defense attorney. This bill creates a special advocate within the FISC who can advocate for the privacy interests of Americans and innocent people around the world. While the advocate would only get to participate in proceedings at the judges' discretion, judges would need to report how often they decide not to appoint an advocate in important cases.

Now for the bad news: The bill still isn't perfect.

Improvements need to be made to further narrow the definition of SST, provide strict time frames for destroying all data on innocent people, eliminate loopholes that could be exploited to avoid disclosing relevant information in FISC opinions, and grant the special advocate greater authority to proactively participate in intelligence court proceedings.

The bill also focuses entirely on Section 215; it doesn't even touch the abuses occurring under Section 702, Executive Order 12333, or other authorities. In other words, we're running a marathon and this bill only gets us to mile five.

So what comes next?

The Senate needs to schedule a vote on the bill, and, hopefully, it will emerge from the chamber unscathed. Then either the House and Senate come to an agreement reconciling the different versions of the bill, or the House decides to vote on the Senate version of the bill.

Finally, if all the stars align, and the president signs a bill that provides real reform, millions of records that would have been vacuumed up under existing law will remain safe from government collection.