added corpus_lib, moved chi2 there