now working for arbitrarily large amount of fruit