adding constraints in model