Updating the corpus and using a more efficient while when compared to an exhasutive .each