fixing inventory to use objects instead of names