external while loop finished