update template and sample