undo button works!

Issue #2 fixed, undo button works.