update template ranking