added cross validation support to evalOutput and fixed some bugs