created while loop