detecting partial matches with multiple IDs