rewrite struct