update elements within text