added methods for RHC and simulated annealing