Refactor: extracting method to class method