optimizations to metropolis sampling