tweaked basic heuristic