add query state interface