cleaned up debug code