done, greedy-ish algorithm