do-and-if-then-else modification