Refactoring part 2