added setVelocity and getVelocity methods