dfs modified