added segment tests and lane change logic