controller for segway program