k-fold cross validation implemented