adding cross validation