added inventory handling