removed most debug statements