one round off cross validation working. fixed factorial bug