updated inventory.py