added constraints for the api