2nd refactoring