How about a `while` instead here?