define query fields and get x/y values