bfs & dfps api updates for bfs layout etc