refactoring for 2nd homework