Added breadth-first feature.