added sim annealing