Change def to class