rebuild struct