Implement Composite design pattern