greedy update