While loop example updated to end