finish Dfs