refactor service resolve