Refactoring: extract method.