deleted dead code, added comments