Added While loop
Added while loop