refactoring web service, cont'd