update the sampling procedure