state results query working