refactoring, second part