add bfs walking
add stack sort, still has bugs