Updated for dfs