completed while-loops challenge