added get inventory function