Preperation for rewrite