add def to model