refactor all struct