finding query value