new while loop for mac