ranch rewrite