generate structure