Updating uniformCostSearch