add undo stack for each sentence