change dataset, sample to pointer