removed some uneeded puts and added comments