added comment on the bfs method