fixed bug in splitDataSet function