Added cross validation for number of steps.