Addding inventory function