update template and support jsonp