Added code to change the velocity.