rewriting structure