testing compound queries and backtracking