changed debug from int to bool