simplify and encapsulate logic used to implement web service