adding undo to a lot of stuff