template update with variables