added simulateAnnealing(need fixes)