Add Sampler function.