added setVelocity method