added bfs and parent of