Rewrite client