adds cross validation check