refactor manager into service