changed setXAccel to velocity