implementation of constraint system