updated with acceleration function