The Senate voted 87-12 Tuesday to pass a major criminal justice reform bill known as the First Step Act, and the measure is expected to win House passage this week and then be signed into law by President Trump.

A similar version of the bill overwhelmingly passed the House in May on a 360-59, leaving little doubt that the House will approve the Senate version. House Speaker Paul Ryan, R-Wis., has expressed support for the legislation and President Trump has also endorsed it.

The president tweeted Tuesday night that the First Step Act “will keep our communities safer, and provide hope and a second chance, to those who earn it. In addition to everything else, billions of dollars will be saved. I look forward to signing this into law!”

The First Step Act applies only the federal criminal justice system. There are currently about 181,000 people in federal prisons as of this month. At the end of 2016 there were about 1.3 million inmates in state prisons and another 741,000 in local jails,

The First Step Act does many wonderful things. It reduces sentences for drug felonies and other non-violent crimes, prevents the use of restraints on pregnant prisoners during childbirth, and limits the disparity in sentences dealing with crack and powder cocaine. This last provision could benefit thousands of federal prisoners.

The bill also allows prisoners to earn "good time credits" to reduce their time in prison if they participate in educational and other programs designed to prepare them for life outside prison so they don’t commit more crimes after they are released – and wind up back in prison.

The Republican Study Committee has said the goal of this part of the bill is to "reduce recidivism by allowing low- or minimum-risk prisoners to earn time credits toward earlier transfer to prerelease custody such as a halfway house if they participate in certain recidivism-reducing programs while in prison."

Specifically, the bill allows prisoners to earn 10 days of "time credit" for every 30 days they participate in recidivism-reducing programs. Minimum-or low-risk prisoners can receive an additional five days of credits.

The bill also allows prisoners to earn "good time credits" to reduce their time in prison if they participate in educational and other programs designed to prepare them for life outside prison so they don’t commit more crimes after they are released – and wind up back in prison.

Perhaps the most significant part of the legislation would be that it shortens prison sentences for non-violent crimes by reducing the "three-strike" mandatory minimum sentence from life imprisonment to 25 years. It would reduce the 20-year mandatory minimum for a second offense to 15 years.

Studies by researchers like Jonathan Caulkins at Carnegie Mellon University have found that mandatory sentencing has been largely ineffective at preventing drug-related crimes. That’s due in part to the fact that most imprisoned drug dealers tend to be low-level and "can be easily replaced on the street.”

Caulkins’ research also found that public funds spent on treatment programs are more effective at reducing cocaine consumption than mandatory minimum prison sentences.

The First Step Act would also broaden the so-called “safety valve,” allowing sentencing courts to consider a sentence below the statutory minimum for some non-violent, low-level drug offenders.

Congressional Budget Office (CBO) researchers predict the First Step Act will reduce the number of federal prisoners by about 53,000 "person-years" over the next 10 years. Keeping fewer inmates in federal prisons will save money.

However, the CBO predicts that legislation could put a further strain on Social Security and Medicaid (which newly released prisoners become immediately eligible for) and predicts the bill would increase direct federal government spending by $346 million and reduce revenue by $6 million over the next 10 years.

The reforms in the legislation are largely a data-driven first step to criminal justice reform based on what has been learned from many successful state experiences. About 20 states have softened their treatment of low-level, nonviolent drug offenders since 2007.

These state "laboratories of democracy" (as Alexis De Tocqueville would put it) have demonstrated that it is possible to shrink prison populations through reforms while cutting crime, which in turn provides its own economic benefits.

Sen. Chuck Grassley, R-Iowa, said in a statement ahead of the Senate vote said that “an opportunity to pass legislation like this that does so much good does not come often. And when it does come, we must join together and support it.”

Through the passage of the First Step Act, congressional Democrats and Republicans are joining together with President Trump as we head into Christmas, fittingly amidst the Advent season of perpetual hope.