merge if statements