fixed generate-successors, BFS workin