split data into training and test sets -- bugfix2