added greedy first assignment