Why add the while loop?