update pregen function continued