init setup rewrite