refactor query options button to header