bfs now properly retraces path and displays list