added inheritance to model