added some functionality to segmented control button