velocity added to velocity change code