Replaced simulated annealing method with a much simpler approach