fixed metropolis search
tested Metropolis search