Extract method refactoring