Refactoring from static method.