added undo-redo functionality, fixes #16