added better cross validation