Look at the old version. This while loop is completely identical to the previous loop.