can this be one if statement ?