updated verletalgorithm so that it also remembers the acceleration