Implemented acceleration calculation