refactored adbService code