update template and js