write blog about iterator pattern and composite pattern