Started implementing dfs