added a function for returning a rest service