Revert "improved if loops to do-while loops"

This reverts commit 01abf05062a14cd3cc37ab52e0409aac1af693ac.