added acceleration and deceleration