Created a while loop