wrote abstract wrapper for k-fold cross validation routine and some basic tests for correctness and reproducibility.