fixed metropolis with new changes