Adding acceleration calculation.