refactored callback based constraints