cleaned up debug()