added is_main_query