using separate constraint class.