improve run all heuristic script