implement Nested query part