instead of a ``do while`` loop wrapped in a condition checking whether the first iteration should be done, you should use a ``while`` loop (which is what you are emulating here)