Starting BFS implementation