added attempt at dfs