updates to 2d metropolis code