First working implementation of Metropolis MCMC