rewrite defs