rewrite the config