Adding part of the logic for InventoryService.cs