halfway working limited dfs