rewrite classes