fix the velocity constraint, add some extra config