updates the text function so that it actually works