moved debug to own class