add breadth-first query