refactor handleService
test
refactoring