replace awkward 'if else' with 'or'