Basic structure of BFS added