Courts program offers potential inmates ‘chance to put their problems behind them’