mock refactoring.