refactored web service client