removed most debug, added debug