made cross-validation a function, fixed zero division in f-score