add function to Segment Control