fixed errors, cross validation API, NB API