acceleration updated and stop function added