small improvement in Greedy heuristic