finished refactoring operation to service