add inventory function.