better inheritance in model