Setting up for rewrite