structure rewrite