added diffInventory method and updated tests