simulated annealing added