Added breadth-first search