update text state