resetting array when removing a word.
resetting array when removing a word.