cleaning up debugging statments and added comments