added inheritance for models