web service calls refactoring