Added acceleration code