innupp1.upp2. removed infinite loop

i made a method to breake out of the loop