subset: DFS method