template update, function, mostly