added greedy