refactoring exercises