optimize structure