state query function added