merged if statement