Added non-constant velocity.