changes to local search algorithm