Breadth-First implemented