changed debug to int