what is this while loop doing? I'm not sure how this would behave on various comparisons.