Refactoring hallidayResnick-2-3