while child is undefined, set it equal to the Query