greedy solution added