added undo/redo for both pc and mac