turn off debug and added some comments