bfs and a* updated