refactor using composite pattern
refactor using composite pattern
composite using iterator