Merged if statement