added QUERY_MAP for multiple dynamic query handling