made recursive dfs indirect