using Corpus methods to clean up code