The Massachusetts Senate will begin debate on a bill to overhaul the state's criminal justice system Thursday, but first the 40-member chamber needs to work through 162 proposed changes to the legislation.

Senators will take up amendments to the bill ranging from small technical changes to moves that some reform advocates say would gut the bill's effectiveness when it comes to ending mandatory minimum sentences for nonviolent drug offenders.

"We're very set on seeing the repeal of mandatory minimums that were in the bill stay in there. We're concerned about some of the amendments that seek to get rid of those reforms that are good policy, that really seek to serve people who are suffering from addiction and there's no empirical data that shows that mandatory minimums work," Rahsaan Hall from the ACLU said.

Most of the state' district attorney's signed on to a letter to Senate President Rosenberg and Senate Judiciary Chairman William Brownsberger expressing their strong opposition to many of the provisions in Brownsberger's bill, including changes to juvenile jurisdiction and proposed drug sentences changes.

Several advocates for the sentencing reforms and other aspects of the bill rejected the DA's overture with their own letter, saying the prosecutors were protecting their own established power instead of the safety of the people.

"It certainly doesn't help when the district attorney's come out with a statement that is nothing more than fear mongering to dissuade people from taking really meaningful progressive reforms that we haven't seen ever before," Hall said.

Senate Republicans have offered dozens of amendments that would remove many of the most controversial portions of the bill, such as increasing the age of criminality to 19 and loosening restrictions on consensual sex between teenagers.

One of the major proposed changes to the bill that Senators will debate is whether to include an update to the state's wiretap laws. Police and prosecutors have asked the Legislature for years to give them wider authority to monitor communications on new technology that wasn't invented when the current laws were written.

"It's a broad overreach and there are not appropriate privacy protections that are put in place when they talk about modernizing the statute to keep pace with technology, but they don't do the same thing for the privacy concerns and it exposes too many to... a lot more surveillance," Hall said.

Another of the proposed amendments is Cape Cod Senator Julian Cyr's legislation that would try to prevent mistreatment of LGBTQ prisoners.

"Being transgender or gender nonconforming in any American jail or prison, including here in Massachusetts, often means humiliation, physical and sexual abuse, limited access to gender-affirming care and months and even sometimes years spent in solitary confinement," Cyr said.

Cyr said that when a prisoner is incarcerated, that prisoner becomes a ward of the state and that the state has responsibilities to meet regarding gender expression and identity.