moved next button out of loop