merge module rewrite and rewrite_manip