some modifications to sgn-constraint.lisp