Added ability to choose type of cross validation