added support for class constraints