query pane refactoring step 1

will move, thanx