added graph generation and BFS