done with greedy.py