webservices refactored