added composite pattern