modified the timed while loop to be infinite