inventory -> inventories dictionary with userid as keys. updated all functions to use inventories