made changes to use hg-resource for service calls