Modified sampler.h