idx in heuristic