created composite pattern