added initial portion for getInventory operation