made changes to velocity calculations