Rewrite Rstar model.