modifications to sampler class