Implemented k-fold testing