rewrite append,replace
r