Added hash table to keep track of the last word shown.