Fixes #10

finally - was missing a exit criteria if there are no items to store and
a rounding issue.