update name matching function