new version of Greedy, incomplete