change Constraint to protocol