collect queries for metadata