Refactoring exercise 1