service initialization refactoring part 2