improve heuristic