started with "undo" function (but does not work yet)