cleand up output, turned infinite loop into exiting the program