update codes for bootstrap analysis