Rewriting class