some changes from mrv_segway