added simulated annealing implementation