bfs setup stuff