moved CV generation into prepare_data where it belongs