refactoring to work with service manager changes