Rewriter. Doesn't work now