Added first part for inventory saving