better dfs
broken bfs for some dumb reason