updates to support queries and query results