included greedy algorithm