Integrate HCP BFS into main logic