made a while loop