Added heuristics.