refactoring separate scope from the service