added template and more restful msgs