added updateText and updateHtml functions