setup while loop

setup validation with a while loop