rms rewrite