refactor the ServiceClient