Rewriting solution.