rewrite registry module