Maybe just give this code a little tidy-up for readability. Space after `for` and between arguments, curly's around `while` and conditional statements below.