Rewrite HEX