set up debug code