add composite design pattern.