added IO operations: save and load shift states