cv function script - did block k fold cv