implemented and tested undo/redo for add-rule and rem-rule