implemented text cursor so that latest word is at the top of resultbox