fetching contact type from query