added method to puts word in a givin string into an array, also method to return all instances of words