Sampling the dataset