refactoring separate scope from service