updated simulated annealing