refactoring part 8