actually added a while loop