Refactoring homework I