undo without storing everything