rewrite core module