use endWord >= text.length()