Can now do cross validation with custom loss functions