added an greedy algorithm for evaluation