uses rx variable to keep track of current text. todo: integrate with reactive