add design patter: iterator, composite and state