reverted to greedy