use greedy algorithm