add python version bfs