added simple metropolis algorithm