implemented fennel heuristic