rewrite surfaces