completed inventory class. now works with all items