should be calling queryState on button click