modify the cadd cmod cdel function contributed by lvxiaojun