done with breadth_first_search