keep track of old contents when reloading, for future undo