refactor velocity variables. Col. detection broken