changed inventory to use pointers instead

need to cast after all