Change encodedArgs to queryState