added funtionality to constraints