just treaverse no need DFS