added inheritance and composition