merge if statement