changed rm operation flow