Creating a sampler