changing turn loop to run until exited