Extract to class