refactoring with mocks