first refactoring step