analyzeInventory has been tested and it works