undo/redo for planar figures working