split data into training and test sets -- bugfix