moved debug to variables