changed do while to infinite for, didn't affect behavior