updated acceleration calculation to reduce wobbles