add DFS solution for testing bigraph