test form nested query improved