some debug code and comments