divided data into training and validation set