refactoring framework for webservices for easier implementation