added basic cross validation