Added a sampler. Current version does not work.