Rewriting of Sketch