function now returns accelerations and positions

Commented change as well. Change made to make it easier to implement in main code. Can revert back to old one if we need to test things out more easily.