moved CV code to lib/cv.R
added rarefaction code