refactor service initialisation