added rm_endmark