Added a boolean to activate the cross-validation