add and select segment
remove selected segment