refactoring abstractService