Refactoring: extract method