create while loop