add bfs and moving