Convert to class