dfs algorithm added