adding support for model inheritance