query pane refactoring step 1