A new state law puts an end to detention centers keeping young offenders in solitary confinement. The state’s five youth centers have prohibited the use of solitary confinement since 2015. Others say that young offenders left in solitary don’t get access to the help they need such as therapy and education.

The law takes effect in January and only allows a short period in solitary if the juvenile is at immediate risk of physical harm. The ACLU of Illinois filed a lawsuit over the issue last week. They allege that kids as young as 11 years old are being locked up alone for up to 23 hours a day at the Franklin County Detention Center in Benton.