BFS with 2 queues working