implemented breadth-first search