restruct code