implement RSegmentedControl