Used heuristics for the optimizer