edited some debug code