web service refactored