updated segmentControl if statement