Merge if stmts for code readability