Added dfs algo