finish breadth search