completed bfs_search and unittests.