Modifying the get_or_add_custodian() function