update bfs_visual as a new API