metropolis steps in c