remove idioms other than if-then-else