Update sampler.cpp