add undo functionality - need to resolve issues with NSInvocation in Swift