It's a little odd to create a while loop that you're just going to break out of at the end. The sort of thing a simple if statement could do.