first refactoring