first phase of hallidayResnick-2-3 second refactor working well