removed inventorys and put them in the function class as opposed to globally