Added while loop and first conditional statement