completed while loop exercise