improve bfs expansion tactic