update heuristic to be more efficient v36