matching to query type