Added custom implementation for Kfolds