added search function for constraints