added controller for segment control