modify to sample