Adding sampler functions