Add move to while loop