add undo func selected version