Simple greedy version of script