refactor manager service