refactoring service