added training data slicing to the data_loader