refactor Constraints Classes