implemented undo for multi-modify, but still has bugs