implemented undo/redo for add-fact-group and rem-fact-group