added inventory to all functions