some bug fixes--for loop issue in utils fixed