fix def to class