small change in GreedyHeuristic