changed to use ancestor queries