adding docstring to traverse_breadth_first