I can't see why we need this while loop?