remove isUndo
remove unneeded code