rewrite schemes generator