added test for directed dfs