Improved identities query to include affiliation and country also.