prototype of sampler