Added sampler. Not sure if code is working