first refactoring #3