add, delete and update now working (including the undo feature)

also catch the error if undo or redo stack is empty