refactoring part 4