Added new heuristic calculation