deleted most debug code and commented out code