And I'm not sure why you're using a run-once do-while loop here. Do you need a block for some forgotten variable scoping, or something else? :/