rewrite module