Changes method to class