modify def to class