use a while loop