change rm function