esrQuery part 1 working