It bounced back and forth between the two chambers for much of last week, but the House gave final passage to a bill Tuesday afternoon that allows most inmates to earn risk reduction credits by participating in programs.

The bill passed 90 to 56 after a lengthy debate over whether certain types of criminals should be able to take classes and programming that reduce recidivism. Those allowed to participate can earn up to 5 days per month off the end of their sentence.

Correction Commissioner Leo Arnone said in a letter to lawmakers that by passing this legislation Connecticut joins 42 other states that offer similar risk reduction credits. Inmates not eligible for the credits includes those convicted of murder, capital felony, felony murder, arson murder, aggravated sexual assault in the first degree, and home invasion.

House Minority Leader Lawrence Cafero, who led the opposition to the bill said his caucus believes there are crimes so heinous that don’t merit lessening a person’s sentence. He said the bill includes only six crimes which are not eligible to earn these credits.

Rep. Doug McCrory, D-Hartford, said it’s the states responsibility to educate these offenders when they’re in prison because if they don’t have the opportunities when they’re released they just end up back in prison.

Cafero said he agrees, but only for inmates who commit nonviolent offenses.

“We know this is an emotional issue,“ Majority Leader Brendan Sharkey, D-Hamden, said. But what he felt some lawmakers weren’t being honest about was the fact that all these prisoners are going to be getting out of prison one day.

“Rapists in jail are going to get out of jail,” Sharkey said. “When that rapist gets out of jail he will rape again unless he receives some kind of treatment for his condition.”

“This is about being smart on crime, not stupid,” Sharkey said dismissing some of the allegations from Republicans that Democrats were being soft on crime by introducing this legislation.

The bill, which also implements parts of the budget, now goes to the governor to sign.

Related: Senate Passes Early Release For Inmates After Seven Hours of Debate

Democrats Want a Redo On Earned Risk Reduction Credits for Inmates