Added 'run' function to sampler.py