modified heuristic